code: def edge_subgraph_test(g, etype_eids_uv_map):
      etypes = g.canonical_etypes
      all_eids = dict()
      for t in etypes:
          all_eids[t] = etype_eids_uv_map[t[1]][0]
  
      sg = g.edge_subgraph(all_eids)
      for t in etypes:
          assert sg.num_edges(t[1]) == len(all_eids[t])
          assert F.allclose(sg.edges[t].data[dgl.EID], all_eids[t])
  
      for u_type, etype, v_type in etypes:
          uv = etype_eids_uv_map[etype][1]
          sg_u_nids = sg.nodes[u_type].data[dgl.NID]
          sg_v_nids = sg.nodes[v_type].data[dgl.NID]
          sg_uv = F.cat([sg_u_nids, sg_v_nids], dim=0)
          for node_id in uv:
              assert node_id in sg_uv
  
imports: import json
  import os
  from itertools import product
  import dgl
  import dgl.backend
  import numpy
  from dgl.distributed import edge_split, load_partition_book, node_split
label_desc: Use image node_id 9 for calling a global function with example usage: edge_subgraph_test(g, etype_eids_uv_map) without return types