(graph)
return rg
Create human readable version of this object's task graph.

    Parameters
    ----------
    graph: nx.DiGraph instance
        The networkx graph representing the pipeline
Create human readable version of this object's task graph.
Create human readable version of this object s task graph .
def readable_graph(graph):
    """Create human readable version of this object's task graph.

    Parameters
    ----------
    graph: nx.DiGraph instance
        The networkx graph representing the pipeline
    """
    import networkx as nx

    mapping = {k: "{}".format(graph.nodes[k]["label"]) for k in graph}
    idx_mapping = {}
    for k, v in mapping.items():
        if v in idx_mapping.keys():
            idx_mapping[v] += 1
            mapping[k] += "-{}".format(idx_mapping[v])
        else:
            idx_mapping[v] = 0

    gg = {k: v for k, v in mapping.items()}
    rg = nx.relabel_nodes(graph, gg, copy=True)
    return rg
def readable_graph ( graph ) : import networkx as nx mapping = { k : "{}" . format ( graph . nodes [ k ] [ "label" ] ) for k in graph } idx_mapping = { } for k , v in mapping . items ( ) : if v in idx_mapping . keys ( ) : idx_mapping [ v ] += 1 mapping [ k ] += "-{}" . format ( idx_mapping [ v ] ) else : idx_mapping [ v ] = 0 gg = { k : v for k , v in mapping . items ( ) } rg = nx . relabel_nodes ( graph , gg , copy = True ) return rg