class_docstr: A size of a financial instrument for use in trading.
  
  Parameters
  ----------
  instrument : `Instrument`
      The unit of the quantity.
  size : `Decimal`
      The number of units of the instrument.
  path_id : str, optional
      The path order_id that this quantity is allocated for and associated
      with.
  
  Raises
  ------
  InvalidNegativeQuantity
      Raised if the `size` of the quantity being created is negative.
docstr: Locks a quantity for an `Order` identified associated with `path_id`.
  
  Parameters
  ----------
  path_id : str
      The identification of the order path.
  
  Returns
  -------
  `Quantity`
      A locked quantity for an order path.
docstr_tok: ["Locks","a","quantity","for","an","`","Order","`","identified","associated","with","`","path_id","`",".","Parameters","--","--","--","--","--","path_id",":","str","The","identification","of","the","order","path",".","Returns","--","--","--","-","`","Quantity","`","A","locked","quantity","for","an","order","path","."]
code: def lock_for(self, path_id: str) -> "Quantity":
      """Locks a quantity for an `Order` identified associated with `path_id`.
  
      Parameters
      ----------
      path_id : str
          The identification of the order path.
  
      Returns
      -------
      `Quantity`
          A locked quantity for an order path.
      """
      return Quantity(self.instrument, self.size, path_id)
  
imports: import operator
  from typing import Union, Tuple, Callable, TypeVar
  from numbers import Number
  from decimal import Decimal, ROUND_DOWN
  from functools import total_ordering
  from tensortrade.core.exceptions import InvalidNegativeQuantity, IncompatibleInstrumentOperation, InvalidNonNumericQuantity, QuantityOpPathMismatch
label_desc: Use image node_id 3 for calling the Quantity obj's underlying member method code with example usage: obj.lock_for(path_id) and returns: Quantity