code: def test_module_heat_kernel(idtype):
      # Case1: directed graph
      g = dgl.graph(
          ([0, 1, 2, 3, 4], [2, 3, 4, 5, 3]),
          idtype=idtype,
          device=F.ctx(),
      )
      g.ndata["h"] = F.randn((6, 2))
      transform = dgl.HeatKernel(avg_degree=1)
      new_g = transform(g)
      assert new_g.idtype == g.idtype
      assert new_g.device == g.device
      assert new_g.num_nodes() == g.num_nodes()
      assert F.allclose(g.ndata["h"], new_g.ndata["h"])
      assert "w" in new_g.edata
  
      # Case2: weighted undirected graph
      g = dgl.graph(
          ([0, 1, 2, 3], [1, 0, 3, 2]), idtype=idtype, device=F.ctx()
      )
      g.edata["w"] = F.tensor([0.1, 0.2, 0.3, 0.4])
      new_g = transform(g)
      src, dst = new_g.edges()
      eset = set(zip(list(F.asnumpy(src)), list(F.asnumpy(dst))))
      assert eset == {(0, 0), (1, 1), (2, 2), (3, 3)}
  
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 43 for calling a global function with example usage: test_module_heat_kernel(idtype) without return types