code: def test_module_compose(idtype):
      g = dgl.graph(([0, 1], [1, 2]), idtype=idtype, device=F.ctx())
      transform = dgl.Compose([dgl.AddReverse(), dgl.AddSelfLoop()])
      new_g = transform(g)
      assert new_g.device == g.device
      assert new_g.idtype == g.idtype
      assert new_g.num_edges() == 7
  
      src, dst = new_g.edges()
      eset = set(zip(list(F.asnumpy(src)), list(F.asnumpy(dst))))
      assert eset == {
          (0, 1),
          (1, 2),
          (1, 0),
          (2, 1),
          (0, 0),
          (1, 1),
          (2, 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 40 for calling a global function with example usage: test_module_compose(idtype) without return types