def element_tree_collection_to_records(tree):
from .bibrecord import create_record<EOL>records = []<EOL>collection = tree.getroot()<EOL>for record_element in collection.getchildren():<EOL><INDENT>marcxml = ET.tostring(record_element, encoding="<STR_LIT:utf-8>")<EOL>record, status, errors = create_record(marcxml)<EOL>if errors:<EOL><INDENT>print(str(status))<EOL><DEDENT>records.append(record)<EOL><DEDENT>return records<EOL>
Take an ElementTree and converts the nodes into BibRecord records.

    This function is for a tree root of collection as such:
    <collection>
        <record>
            <!-- MARCXML -->
        </record>
        <record> ... </record>
    </collection>