def body_blocks(soup):
nodenames = body_block_nodenames()<EOL>body_block_tags = []<EOL>if not soup:<EOL><INDENT>return body_block_tags<EOL><DEDENT>first_sibling_node = firstnn(soup.find_all())<EOL>if first_sibling_node is None:<EOL><INDENT>return body_block_tags<EOL><DEDENT>sibling_tags = first_sibling_node.find_next_siblings(nodenames)<EOL>body_block_tags.append(first_sibling_node)<EOL>for tag in sibling_tags:<EOL><INDENT>body_block_tags.append(tag)<EOL><DEDENT>return body_block_tags<EOL>
Note: for some reason this works and few other attempted methods work
Search for certain node types, find the first nodes siblings of the same type
Add the first sibling and the other siblings to a list and return them