def tag_fig_ordinal(tag):
tag_count = <NUM_LIT:0><EOL>if '<STR_LIT>' not in tag.attrs:<EOL><INDENT>return len(list(filter(lambda tag: '<STR_LIT>' not in tag.attrs,<EOL>tag.find_all_previous(tag.name)))) + <NUM_LIT:1><EOL><DEDENT>
Meant for finding the position of fig tags with respect to whether
they are for a main figure or a child figure