def tag_details(tag, nodenames):
details = {}<EOL>details['<STR_LIT:type>'] = tag.name<EOL>details['<STR_LIT>'] = tag_ordinal(tag)<EOL>if tag_details_sibling_ordinal(tag):<EOL><INDENT>details['<STR_LIT>'] = tag_details_sibling_ordinal(tag)<EOL><DEDENT>if tag_details_asset(tag):<EOL><INDENT>details['<STR_LIT>'] = tag_details_asset(tag)<EOL><DEDENT>object_id_tag = first(raw_parser.object_id(tag, pub_id_type= "<STR_LIT>"))<EOL>if object_id_tag:<EOL><INDENT>details['<STR_LIT>'] = extract_component_doi(tag, nodenames)<EOL><DEDENT>return details<EOL>
Used in media and graphics to extract data from their parent tags