code: def process_file(path):
      
      info = dict()
      with fits.open(path) as hdu:
          head = hdu[0].header
          data = hdu[0].data
          labels = {theme: value for value, theme in list(hdu[1].data)}
      info['filename'] = os.path.basename(path)
      info['trainer'] = head['expert']
      info['date-label'] = dateparser.parse(head['date-lab'])
      info['date-observation'] = dateparser.parse(head['date-end'])
      for theme in themes:
          info[theme + "_count"] = np.sum(data == labels[theme])
      return info
docs: Open a single labeled image at path and get needed information, return as a dictionary