code: def get_imgid(self, img):
          
          imgid = img.filename()
  
          # More heuristics here...
          # get FILENAME keyword, CHECKSUM, for example...
          hdr = self.get_header(img)
          if 'checksum' in hdr:
              return hdr['checksum']
  
          if 'filename' in hdr:
              return hdr['filename']
  
          if not imgid:
              imgid = repr(img)
  
          return imgid
docs: Obtain a unique identifier of the image.
  
          Parameters
          ----------
          img : astropy.io.fits.HDUList
  
          Returns
          -------
          str:
               Identification of the image