human
I wrote the below code

    graph = nx.DiGraph()
    id_ = attrs['id']
    children = attrs['children']
    def add_children(parent, children_):
        for data in children_:
            child = data[id_]
            graph.add_edge(parent, child)
            grandchildren = data.get(children, [])
            if grandchildren:
                add_children(child, grandchildren)
            nodedata = dict(((make_str(k), v) for (k, v) in data.items() if ((k != id_) and (k != children))))
            graph.add_node(child, **nodedata)
    root = data[id_]
    children_ = data.get(children, [])
    nodedata = dict(((make_str(k), v) for (k, v) in data.items() if ((k != id_) and (k != children))))
    graph.add_node(root, **nodedata)
    add_children(root, children_)
    return graph

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def tree_graph(data, attrs=_attrs):