def net2graph(net_sm):
    """Transform the network to DGL graph

    Return
    ------
    G DGLGraph : graph by DGL
    """
    start = time.time()
    G = dgl.DGLGraph(net_sm)
    end = time.time()
    t = end - start
    print("Building DGLGraph in %.2fs" % t)
    return G
Transform the network to DGL graph

    Return
    ------
    G DGLGraph : graph by DGL
    
examples/pytorch/ogb/line/reading_data.py