(node, graph)
Create networkx graph of the pipeline

    Parameters
    ----------
    node : Stream
        The node to start from
    graph : networkx.DiGraph
        The graph to fill with nodes

    Returns
    -------
Create networkx graph of the pipeline
Create networkx graph of the pipeline
def create_graph(node, graph):
    """Create networkx graph of the pipeline

    Parameters
    ----------
    node : Stream
        The node to start from
    graph : networkx.DiGraph
        The graph to fill with nodes

    Returns
    -------

    """
    # Step 1 build a set of all the nodes
    node_set = build_node_set(node)

    # Step 2 for each node in the set add to the graph
    for n in node_set:
        t = hash(n)
        graph.add_node(
            t,
            label=_clean_text(str(n)),
            shape=n._graphviz_shape,
            orientation=str(n._graphviz_orientation),
            style=n._graphviz_style,
            fillcolor=n._graphviz_fillcolor,
        )

    # Step 3 for each node establish its edges
    for n in node_set:
        t = hash(n)
        for nn in n.upstreams:
            tt = hash(nn)
            graph.add_edge(tt, t)

        downstreams = n.downstreams
        for i, nn in enumerate(downstreams):
            tt = hash(nn)
            if len(downstreams) > 1:
                graph.add_edge(t, tt, label=str(i))
            else:
                graph.add_edge(t, tt)

    # Step 4 destroy set
    del node_set
def create_graph ( node , graph ) : # Step 1 build a set of all the nodes node_set = build_node_set ( node ) # Step 2 for each node in the set add to the graph for n in node_set : t = hash ( n ) graph . add_node ( t , label = _clean_text ( str ( n ) ) , shape = n . _graphviz_shape , orientation = str ( n . _graphviz_orientation ) , style = n . _graphviz_style , fillcolor = n . _graphviz_fillcolor , ) # Step 3 for each node establish its edges for n in node_set : t = hash ( n ) for nn in n . upstreams : tt = hash ( nn ) graph . add_edge ( tt , t ) downstreams = n . downstreams for i , nn in enumerate ( downstreams ) : tt = hash ( nn ) if len ( downstreams ) > 1 : graph . add_edge ( t , tt , label = str ( i ) ) else : graph . add_edge ( t , tt ) # Step 4 destroy set del node_set