docs: def to_image_meta_data(img):
      '''
      to_image_meta_data(img) yields a dictionary of meta-data for the given nibabel image object img.
      to_image_meta_data(hdr) yields the equivalent meta-data for the given nibabel image header.
  
      Note that obj may also be a mapping object, in which case it is returned verbatim.
      '''
      if pimms.is_map(img): return img
      try: hdr = img.header
      except Exception: hdr = img
      intype = to_image_type(hdr)
      return intype.meta_data(hdr)