class_docstr: TreeLSTM from DGL.
class_docstr_tok: ["TreeLSTM","from","DGL","."]
code: def spans_to_dgl(trees):
      (n_nodes, a, b, label), indices, topo = CKY.to_networkx(
          trees.cpu()
      )
      g = dgl.DGLGraph()
      g.add_nodes(n_nodes)
      g.add_edges(a, b)
      return g, label, indices, topo
  
file_path: pytorch-struct/examples/networks/TreeLSTM.py
imports: import torch
  import torch
  import torch.nn
  import dgl
  from torch_struct import CKY
label_desc: Use image node_id 3 for calling the TreeLSTM obj's underlying member method code with example usage: obj.spans_to_dgl(trees) and returns: g,  label,  indices,  topo