def fix_related_item_tag(dom):
location = dom.match(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>"<EOL>)<EOL>if not location:<EOL><INDENT>return<EOL><DEDENT>location = first(location)<EOL>location.replaceWith(<EOL>dhtmlparser.HTMLElement()<EOL>)<EOL>related_item = dom.match(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>"<EOL>)<EOL>related_item = first(related_item)<EOL>if not related_item.getContent().strip():<EOL><INDENT>related_item.replaceWith(dhtmlparser.HTMLElement())<EOL><DEDENT>
Remove <mods:relatedItem> tag in case that there is only <mods:location>
subtag.