docs: def from_pint(cls, arr, unit_registry=None):
          """
          Convert a Pint "Quantity" to a unyt_array or unyt_quantity.
  
          Parameters
          ----------
          arr : Pint Quantity
              The Quantity to convert from.
          unit_registry : yt UnitRegistry, optional
              A yt unit registry to use in the conversion. If one is not
              supplied, the default one will be used.
  
          Examples
          --------
          >>> from pint import UnitRegistry
          >>> import numpy as np
          >>> ureg = UnitRegistry()
          >>> a = np.arange(4)
          >>> b = ureg.Quantity(a, "erg/cm**3")
          >>> b
          <Quantity([0 1 2 3], 'erg / centimeter ** 3')>
          >>> c = unyt_array.from_pint(b)
          >>> c
          unyt_array([0, 1, 2, 3], 'erg/cm**3')
          """
          p_units = []
          for base, exponent in arr._units.items():
              bs = convert_pint_units(base)
              p_units.append("%s**(%s)" % (bs, Rational(exponent)))
          p_units = "*".join(p_units)
          if isinstance(arr.magnitude, np.ndarray):
              return unyt_array(arr.magnitude, p_units, registry=unit_registry)
          else:
              return unyt_quantity(arr.magnitude, p_units, registry=unit_registry)