class_docstr: Class of graph data which is used for DGLGraph construction. Internal use only.
class_docstr_tok: ["Class","of","graph","data","which","is","used","for","DGLGraph","construction",".","Internal","use","only","."]
code: def to_dict(graph_data: "GraphData", graphs_dict: dict) -> dict:
      missing_ids = np.setdiff1d(
          np.array(list(graphs_dict.keys())), graph_data.graph_id
      )
      if len(missing_ids) > 0:
          raise DGLError(
              "Found following graph ids in node/edge CSVs but not in graph CSV: {}.".format(
                  missing_ids
              )
          )
      graph_ids = graph_data.graph_id
      graphs = []
      for graph_id in graph_ids:
          if graph_id not in graphs_dict:
              graphs_dict[graph_id] = dgl_heterograph(
                  {("_V", "_E", "_V"): ([], [])}
              )
      for graph_id in graph_ids:
          graphs.append(graphs_dict[graph_id])
      data = {
          k: F.reshape(_tensor(v), (len(graphs), -1))
          for k, v in graph_data.data.items()
      }
      return graphs, data
  
imports: import ast
  import os
  from typing import Callable, List, Optional
  import numpy
  import pandas
  import pydantic
  import yaml
  from ..None import backend
  from ..base import dgl_warning, DGLError
  from ..convert import heterograph
label_desc: Use image node_id 3 for calling the GraphData obj's underlying member method code with example usage: obj.to_dict(graph_data, graphs_dict) and returns: graphs,  data