def object_id_doi(tag, parent_tag_name=None):
doi = None<EOL>object_id = None<EOL>object_ids = raw_parser.object_id(tag, "<STR_LIT>")<EOL>if object_ids:<EOL><INDENT>object_id = first([id_ for id_ in object_ids])<EOL><DEDENT>if parent_tag_name and object_id and object_id.parent.name != parent_tag_name:<EOL><INDENT>object_id = None<EOL><DEDENT>if object_id:<EOL><INDENT>doi = node_contents_str(object_id)<EOL><DEDENT>return doi<EOL>
DOI in an object-id tag found inside the tag