def component_acting_parent_tag(parent_tag, tag):
if parent_tag.name == "<STR_LIT>":<EOL><INDENT>if (len(tag.find_previous_siblings("<STR_LIT>")) > <NUM_LIT:0>):<EOL><INDENT>acting_parent_tag = first(extract_nodes(parent_tag, "<STR_LIT>"))<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>else:<EOL><INDENT>acting_parent_tag = parent_tag<EOL><DEDENT>return acting_parent_tag<EOL>
Only intended for use in getting components, look for tag name of fig-group
and if so, find the first fig tag inside it as the acting parent tag