code: def as_hdu(self):
          "Return a version of ourself as an astropy.io.fits.PrimaryHDU object"
          from astropy.io import fits
  
          # transfer header, preserving ordering
          ahdr = self.get_header()
          header = fits.Header(ahdr.items())
          data = self.get_mddata()
  
          hdu = fits.PrimaryHDU(data=data, header=header)
          return hdf as_hdu(self):
          "Return a version of ourself as an astropy.io.fits.PrimaryHDU object"
          from astropy.io import fits
  
          # transfer header, preserving ordering
          ahdr = self.get_header()
          header = fits.Header(ahdr.items())
          data = self.get_mddata()
  
          hdu = fits.PrimaryHDU(data=data, header=header)
          return hdu
docs: Return a version of ourself as an astropy.io.fits.PrimaryHDU object