code: def verify_graph_feats(
      g, gpb, part, node_feats, edge_feats, orig_nids, orig_eids
  ):
      for ntype in g.ntypes:
          ntype_id = g.get_ntype_id(ntype)
          inner_node_mask = _get_inner_node_mask(part, ntype_id)
          inner_nids = F.boolean_mask(
              part.ndata[dgl.NID], inner_node_mask
          )
          ntype_ids, inner_type_nids = gpb.map_to_per_ntype(inner_nids)
          partid = gpb.nid2partid(inner_type_nids, ntype)
          assert np.all(F.asnumpy(ntype_ids) == ntype_id)
          assert np.all(F.asnumpy(partid) == gpb.partid)
  
          orig_id = orig_nids[ntype][inner_type_nids]
          local_nids = gpb.nid2localnid(
              inner_type_nids, gpb.partid, ntype
          )
  
          for name in g.nodes[ntype].data:
              if name in [dgl.NID, "inner_node"]:
                  continue
              true_feats = F.gather_row(
                  g.nodes[ntype].data[name], orig_id
              )
              ndata = F.gather_row(
                  node_feats[ntype + "/" + name], local_nids
              )
              assert np.all(F.asnumpy(ndata == true_feats))
  
      for etype in g.canonical_etypes:
          etype_id = g.get_etype_id(etype)
          inner_edge_mask = _get_inner_edge_mask(part, etype_id)
          inner_eids = F.boolean_mask(
              part.edata[dgl.EID], inner_edge_mask
          )
          etype_ids, inner_type_eids = gpb.map_to_per_etype(inner_eids)
          partid = gpb.eid2partid(inner_type_eids, etype)
          assert np.all(F.asnumpy(etype_ids) == etype_id)
          assert np.all(F.asnumpy(partid) == gpb.partid)
  
          orig_id = orig_eids[etype][inner_type_eids]
          local_eids = gpb.eid2localeid(
              inner_type_eids, gpb.partid, etype
          )
  
          for name in g.edges[etype].data:
              if name in [dgl.EID, "inner_edge"]:
                  continue
              true_feats = F.gather_row(
                  g.edges[etype].data[name], orig_id
              )
              edata = F.gather_row(
                  edge_feats[_etype_tuple_to_str(etype) + "/" + name],
                  local_eids,
              )
              assert np.all(F.asnumpy(edata == true_feats))
  
imports: import json
  import os
  import tempfile
  import backend
  import dgl
  import numpy
  import pytest
  import torch
  from dgl import function
  from dgl.distributed import convert_dgl_partition_to_csc_sampling_graph, load_partition, load_partition_book, load_partition_feats, partition_graph
  from dgl.distributed.graph_partition_book import _etype_str_to_tuple, _etype_tuple_to_str, DEFAULT_ETYPE, DEFAULT_NTYPE, EdgePartitionPolicy, HeteroDataName, NodePartitionPolicy, RangePartitionBook
  from dgl.distributed.partition import _get_inner_edge_mask, _get_inner_node_mask, RESERVED_FIELD_DTYPE
  from scipy import sparse
  from utils import reset_envs
label_desc: Use image node_id 6 for calling a global function with example usage: verify_graph_feats(g, gpb, part, node_feats, edge_feats, orig_nids, orig_eids) without return types