def inspect_to_metadata(metadata_object, inspect_data):
identifier = graceful_get(inspect_data, '<STR_LIT>') or graceful_get(inspect_data, '<STR_LIT>')<EOL>if identifier:<EOL><INDENT>if "<STR_LIT::>" in identifier:<EOL><INDENT>metadata_object.identifier = identifier.split('<STR_LIT::>')[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>metadata_object.identifier = identifier<EOL><DEDENT><DEDENT>raw_env_vars = graceful_get(inspect_data, "<STR_LIT>", "<STR_LIT>") or []<EOL>if raw_env_vars:<EOL><INDENT>metadata_object.env_variables = {}<EOL>for env_variable in raw_env_vars:<EOL><INDENT>splits = env_variable.split("<STR_LIT:=>", <NUM_LIT:1>)<EOL>name = splits[<NUM_LIT:0>]<EOL>value = splits[<NUM_LIT:1>] if len(splits) > <NUM_LIT:1> else None<EOL>if value is not None:<EOL><INDENT>metadata_object.env_variables.update({name: value})<EOL><DEDENT><DEDENT><DEDENT>raw_exposed_ports = graceful_get(inspect_data, "<STR_LIT>", "<STR_LIT>")<EOL>if raw_exposed_ports:<EOL><INDENT>metadata_object.exposed_ports = list(set([d["<STR_LIT>"] for d in raw_exposed_ports]))<EOL><DEDENT>raw_repo_tags = graceful_get(inspect_data, '<STR_LIT>')<EOL>if raw_repo_tags:<EOL><INDENT>metadata_object.name = raw_repo_tags[<NUM_LIT:0>]<EOL><DEDENT>metadata_object.labels = graceful_get(inspect_data, '<STR_LIT>', '<STR_LIT>')<EOL>metadata_object.command = graceful_get(inspect_data, '<STR_LIT>', '<STR_LIT>')<EOL>metadata_object.creation_timestamp = inspect_data.get('<STR_LIT>', None)<EOL>metadata_object.image_names = inspect_data.get('<STR_LIT>', None)<EOL>digests = inspect_data.get("<STR_LIT>", None)<EOL>if digests:<EOL><INDENT>metadata_object.repo_digests = digests<EOL>metadata_object.digest = digests[<NUM_LIT:0>]<EOL><DEDENT>return metadata_object<EOL>
process data from `podman inspect` and update provided metadata object

:param metadata_object: instance of Metadata
:param inspect_data: dict, metadata from `podman inspect`
:return: instance of Metadata