def METHOD_NAME(index, outs):
    import networkx as nx
    from dvc.stage import Stage
    def _relabel(node) -> str:
        return node.addressing if isinstance(node, Stage) else str(node)
    graph = index.outs_graph if outs else index.graph
    return nx.relabel_nodes(graph, _relabel, copy=True)