def graphics(soup):
graphics = []<EOL>graphic_tags = raw_parser.graphic(soup)<EOL>position = <NUM_LIT:1><EOL>for tag in graphic_tags:<EOL><INDENT>graphic_item = {}<EOL>copy_attribute(tag.attrs, '<STR_LIT>', graphic_item, '<STR_LIT>')<EOL>nodenames = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL>details = tag_details(tag, nodenames)<EOL>copy_attribute(details, '<STR_LIT:type>', graphic_item)<EOL>parent_tag = first_parent(tag, nodenames)<EOL>if parent_tag:<EOL><INDENT>details = tag_details(parent_tag, nodenames)<EOL>copy_attribute(details, '<STR_LIT:type>', graphic_item, '<STR_LIT>')<EOL>copy_attribute(details, '<STR_LIT>', graphic_item, '<STR_LIT>')<EOL>copy_attribute(details, '<STR_LIT>', graphic_item, '<STR_LIT>')<EOL>copy_attribute(details, '<STR_LIT>', graphic_item, '<STR_LIT>')<EOL>copy_attribute(details, '<STR_LIT>', graphic_item, '<STR_LIT>')<EOL>p_parent_tag = first_parent(parent_tag, nodenames)<EOL>if p_parent_tag:<EOL><INDENT>acting_p_parent_tag = component_acting_parent_tag(p_parent_tag, parent_tag)<EOL>if acting_p_parent_tag:<EOL><INDENT>details = tag_details(acting_p_parent_tag, nodenames)<EOL>copy_attribute(details, '<STR_LIT:type>', graphic_item, '<STR_LIT>')<EOL>copy_attribute(details, '<STR_LIT>', graphic_item, '<STR_LIT>')<EOL>copy_attribute(details, '<STR_LIT>', graphic_item, '<STR_LIT>')<EOL>copy_attribute(details, '<STR_LIT>', graphic_item, '<STR_LIT>')<EOL>copy_attribute(details, '<STR_LIT>', graphic_item, '<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>graphic_item['<STR_LIT>'] = position<EOL>graphic_item['<STR_LIT>'] = tag_ordinal(tag)<EOL>graphics.append(graphic_item)<EOL>position += <NUM_LIT:1><EOL><DEDENT>return graphics<EOL>
All graphic tags and some associated data about the related component doi
and the parent of that doi (not always present), and whether it is
part of a figure supplement