def METHOD_NAME(data_filename, canonical_filename, verbose=False):
    nodes1 = None
    nodes2 = None
    try:
        nodes1 = list(yaml.compose_all(open(data_filename, 'rb')))
        nodes2 = list(yaml.canonical_compose_all(open(canonical_filename, 'rb')))
        assert len(nodes1) == len(nodes2), (len(nodes1), len(nodes2))
        for node1, node2 in zip(nodes1, nodes2):
            _compare_nodes(node1, node2)
    finally:
        if verbose:
            print("NODES1:")  # ext-print: ignore
            pprint.pprint(nodes1)  # ext-print: ignore
            print("NODES2:")  # ext-print: ignore
            pprint.pprint(nodes2)  # ext-print: ignore