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: Computes the quantization of current quantity in terms of the instrument's
  precision.
  
  Returns
  -------
  `Quantity`
      The quantized quantity.
docstr_tok: ["Computes","the","quantization","of","current","quantity","in","terms","of","the","instrument's","precision",".","Returns","--","--","--","-","`","Quantity","`","The","quantized","quantity","."]
code: def quantize(self) -> "Quantity":
      """Computes the quantization of current quantity in terms of the instrument's
      precision.
  
      Returns
      -------
      `Quantity`
          The quantized quantity.
      """
      return Quantity(
          self.instrument,
          self.size.quantize(Decimal(10) ** -self.instrument.precision),
          self.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 6 for calling the Quantity obj's underlying member method code with example usage: obj.quantize() and returns: Quantity