code: def _read_graph(schema):
      """Read a DGL Graph object from storage using metadata schema, which is
      a json object describing the DGL graph on disk.
  
      Parameters:
      -----------
      schema : json object
          json object describing the input graph to read from the disk
  
      Returns:
      --------
      DGL Graph Object :
          DGL Graph object is created which is read from the disk storage.
      """
      edges = {}
      edge_types = schema[constants.STR_EDGE_TYPE]
      for etype in edge_types:
          efiles = schema[constants.STR_EDGES][etype][
              constants.STR_DATA
          ]
          src = []
          dst = []
          for fname in efiles:
              if (
                  schema[constants.STR_EDGES][etype][
                      constants.STR_FORMAT
                  ][constants.STR_NAME]
                  == constants.STR_CSV
              ):
                  data = read_file(fname, constants.STR_CSV)
              elif (
                  schema[constants.STR_EDGES][etype][
                      constants.STR_FORMAT
                  ][constants.STR_NAME]
                  == constants.STR_PARQUET
              ):
                  data = read_file(fname)
              else:
                  raise ValueError(
                      f"Unknown edge format for {etype} - {schema[constants.STR_EDGES][etype][constants.STR_FORMAT]}"
                  )
  
                  src.append(data[:, 0])
              dst.append(data[:, 1])
          src = np.concatenate(src)
          dst = np.concatenate(dst)
          edges[_etype_str_to_tuple(etype)] = (src, dst)
  
      g = dgl.heterograph(edges)
      # g = dgl.to_homogeneous(g)
  
      g.ndata["orig_id"] = g.ndata[dgl.NID]
      g.edata["orig_id"] = g.edata[dgl.EID]
  
      # read features here.
      for ntype in schema[constants.STR_NODE_TYPE]:
          if ntype in schema[constants.STR_NODE_DATA]:
              for featname, featdata in schema[constants.STR_NODE_DATA][
                  ntype
              ].items():
                  files = fdata[constants.STR_DATA]
                  feats = []
                  for fname in files:
                      feats.append(
                          read_file(fname, constants.STR_NUMPY)
                      )
                  if len(feats) > 0:
                      g.nodes[ntype].data[featname] = th.from_numpy(
                          np.concatenate(feats)
                      )
  
      # read edge features here.
      for etype in schema[constants.STR_EDGE_TYPE]:
          if etype in schema[constants.STR_EDGE_DATA]:
              for featname, fdata in schema[constants.STR_EDGE_DATA][
                  etype
              ]:
                  files = fdata[constants.STR_DATA]
                  feats = []
                  for fname in files:
                      feats.append(read_file(fname))
                  if len(feats) > 0:
                      g.edges[etype].data[featname] = th.from_numpy(
                          np.concatenate(feats)
                      )
  
      # print from graph
      logging.info(f"|V|= {g.num_nodes()}")
      logging.info(f"|E|= {g.num_edges()}")
      for ntype in g.ntypes:
          for name, data in g.nodes[ntype].data.items():
              if isinstance(data, th.Tensor):
                  logging.info(
                      f"Input Graph: nfeat - {ntype}/{name} - data - {data.size()}"
                  )
  
      for c_etype in g.canonical_etypes:
          for name, data in g.edges[c_etype].data.items():
              if isinstance(data, th.Tensor):
                  logging.info(
                      f"Input Graph: efeat - {etype}/{name} - data - {g.edges[etype].data[name].size()}"
                  )
  
      return g
  
file_path: dgl/tools/verify_partitions.py
imports: import argparse
  import logging
  import os
  import platform
  import constants
  import dgl
  import numpy
  import pyarrow
  import pyarrow.parquet
  import torch
  from dgl.data.utils import load_graphs, load_tensors
  from dgl.distributed.partition import _etype_str_to_tuple, _etype_tuple_to_str, _get_inner_edge_mask, _get_inner_node_mask, load_partition, RESERVED_FIELD_DTYPE
  from utils import get_idranges, read_json
  from verification_utils import get_node_partids, read_file, read_orig_ids, verify_graph_feats, verify_metadata_counts, verify_node_partitionids, verify_partition_data_types, verify_partition_formats
label_desc: Use image node_id 1 for calling a global function with example usage: _read_graph(schema) and returns: g