code: def test_module_khop_graph(idtype):
      transform = dgl.KHopGraph(2)
      g = dgl.graph(([0, 1], [1, 2]), idtype=idtype, device=F.ctx())
      g.ndata["h"] = F.randn((g.num_nodes(), 2))
      new_g = transform(g)
      assert new_g.device == g.device
      assert new_g.idtype == g.idtype
      assert new_g.num_nodes() == g.num_nodes()
      assert F.allclose(g.ndata["h"], new_g.ndata["h"])
      src, dst = new_g.edges()
      eset = set(zip(list(F.asnumpy(src)), list(F.asnumpy(dst))))
      assert eset == {(0, 2)}
  
imports: import math
  import os
  import unittest
  import backend
  import dgl
  import dgl.function
  import dgl.partition
  import networkx
  import numpy
  import pytest
  from scipy import sparse
  from utils import parametrize_idtype
  from utils.graph_cases import get_cases
label_desc: Use image node_id 38 for calling a global function with example usage: test_module_khop_graph(idtype) without return types