(targets, root)
return adjacency
Create a trivial (flat) hiearchy, linking all given targets to given root node.
Create a trivial (flat) hiearchy, linking all given targets to given root node.
Create a trivial ( flat ) hiearchy linking all given targets to given root node .
def make_flat_hierarchy(targets, root):
    """Create a trivial (flat) hiearchy, linking all given targets to given root node."""
    adjacency = defaultdict(list)
    for target in targets:
        adjacency[root].append(target)
    return adjacency
def make_flat_hierarchy ( targets , root ) : adjacency = defaultdict ( list ) for target in targets : adjacency [ root ] . append ( target ) return adjacency