def identify_image(image):
try:<EOL><INDENT>attrs = tuple(getattr(image, attr) for attr in UNIQUE_IMAGE_ATTRIBUTES)<EOL><DEDENT>except AttributeError:<EOL><INDENT>attrs = tuple(image.get(attr, None) for attr in UNIQUE_IMAGE_ATTRIBUTES)<EOL><DEDENT>ui = UniqueImage(*attrs)<EOL>return ui._replace(<EOL>unified=ui.unified or False, additional_variants=ui.additional_variants or []<EOL>)<EOL>
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.