def body_block_content_render(tag, recursive=False, base_url=None):
block_content_list = []<EOL>tag_content = OrderedDict()<EOL>if tag.name == "<STR_LIT:p>":<EOL><INDENT>for block_content in body_block_paragraph_render(tag, base_url=base_url):<EOL><INDENT>if block_content != {}:<EOL><INDENT>block_content_list.append(block_content)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>tag_content = body_block_content(tag, base_url=base_url)<EOL><DEDENT>nodenames = body_block_nodenames()<EOL>tag_content_content = []<EOL>if tag.name not in ["<STR_LIT:p>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT:list>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT:code>"]:<EOL><INDENT>for child_tag in tag:<EOL><INDENT>if not(hasattr(child_tag, '<STR_LIT:name>')):<EOL><INDENT>continue<EOL><DEDENT>if child_tag.name == "<STR_LIT:p>":<EOL><INDENT>if node_text(child_tag) and len(remove_doi_paragraph([child_tag])) <= <NUM_LIT:0>:<EOL><INDENT>continue<EOL><DEDENT>for block_content in body_block_paragraph_render(child_tag, base_url=base_url):<EOL><INDENT>if block_content != {}:<EOL><INDENT>tag_content_content.append(block_content)<EOL><DEDENT><DEDENT><DEDENT>elif child_tag.name == "<STR_LIT>" and tag.name == "<STR_LIT>":<EOL><INDENT>pass<EOL><DEDENT>elif child_tag.name == "<STR_LIT>" and tag.name == "<STR_LIT>":<EOL><INDENT>if child_tag.get("<STR_LIT>") == "<STR_LIT>":<EOL><INDENT>pass<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for block_content in body_block_content_render(child_tag, recursive=True, base_url=base_url):<EOL><INDENT>if block_content != {}:<EOL><INDENT>tag_content_content.append(block_content)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>if len(tag_content_content) > <NUM_LIT:0>:<EOL><INDENT>if tag.name in nodenames or recursive is False:<EOL><INDENT>tag_content["<STR_LIT:content>"] = []<EOL>for block_content in tag_content_content:<EOL><INDENT>tag_content["<STR_LIT:content>"].append(block_content)<EOL><DEDENT>block_content_list.append(tag_content)<EOL><DEDENT>else:<EOL><INDENT>block_content_list = tag_content_content<EOL><DEDENT><DEDENT>else:<EOL><INDENT>block_content_list.append(tag_content)<EOL><DEDENT>return block_content_list<EOL>
Render the tag as body content and call recursively if
the tag has child tags