def __assert_all_nodes_in_regions(num_of_nodes, regions):
    """Assert that every oned is included in exactly one region"""
    all_nodes = range(num_of_nodes)
    nodes_in_region = []
    for region in regions:
        nodes_in_region += range(region[0], region[1])
    nodes_in_region.sort()
    return nodes_in_region == all_nodes
