code: def to_astropy(self, **kwargs):
          
          return self.value * _astropy.units.Unit(str(self.units), **kwargs)
docs: Creates a new AstroPy quantity with the same unit information.
  
          Example
          -------
          >>> from unyt import g, cm
          >>> data = [3, 4, 5]*g/cm**3
          >>> data.to_astropy()
          <Quantity [3., 4., 5.] g / cm3>