docs: def identify_image(image):
      """Provides a tuple of image's UNIQUE_IMAGE_ATTRIBUTES. Note:
      this is not guaranteed to be unique (and will often not be)
      for pre-1.1 metadata, as subvariant did not exist. Provided as
      a function so consumers can use it on plain image dicts read from
      the metadata or PDC.
      """
      try:
          # Image instance case
          attrs = tuple(getattr(image, attr) for attr in UNIQUE_IMAGE_ATTRIBUTES)
      except AttributeError:
          # Plain dict case
          attrs = tuple(image.get(attr, None) for attr in UNIQUE_IMAGE_ATTRIBUTES)
      ui = UniqueImage(*attrs)
      # If unified is None (which could happen in the dict case, we want default
      # value of False instead. Also convert additional_variants to a list.
      return ui._replace(
          unified=ui.unified or False, additional_variants=ui.additional_variants or []
      )