class_docstr: Object to hold the data to be stored for DGLGraph
class_docstr_tok: ["Object","to","hold","the","data","to","be","stored","for","DGLGraph"]
code: def get_graph(self):
      ntensor_list = list(_CAPI_GetNDataFromHeteroGraphData(self))
      etensor_list = list(_CAPI_GetEDataFromHeteroGraphData(self))
      ntype_names = list(_CAPI_GetNtypesFromHeteroGraphData(self))
      etype_names = list(_CAPI_GetEtypesFromHeteroGraphData(self))
      gidx = _CAPI_GetGindexFromHeteroGraphData(self)
      nframes = []
      eframes = []
      for ntid, ntensor in enumerate(ntensor_list):
          ndict = {
              ntensor[i]: F.zerocopy_from_dgl_ndarray(ntensor[i + 1])
              for i in range(0, len(ntensor), 2)
          }
          nframes.append(Frame(ndict, num_rows=gidx.num_nodes(ntid)))
  
      for etid, etensor in enumerate(etensor_list):
          edict = {
              etensor[i]: F.zerocopy_from_dgl_ndarray(etensor[i + 1])
              for i in range(0, len(etensor), 2)
          }
          eframes.append(Frame(edict, num_rows=gidx.num_edges(etid)))
  
      return DGLGraph(gidx, ntype_names, etype_names, nframes, eframes)
  
file_path: dgl/python/dgl/data/heterograph_serialize.py
imports: from __future__ import absolute_import
  from ..None import backend
  from .._ffi.function import _init_api
  from .._ffi.object import ObjectBase, register_object
  from ..container import convert_to_strmap
  from ..frame import Frame
  from ..heterograph import DGLGraph
label_desc: Use image node_id 2 for calling the HeteroGraphData obj's underlying member method code with example usage: obj.get_graph() and returns: DGLGraph