code: def test_module_line_graph(idtype):
      transform = dgl.LineGraph()
      g = dgl.graph(
          ([0, 1, 1], [1, 0, 2]), idtype=idtype, device=F.ctx()
      )
      g.ndata["h"] = F.tensor([[0.0], [1.0], [2.0]])
      g.edata["w"] = F.tensor([[0.0], [0.1], [0.2]])
      new_g = transform(g)
      assert new_g.device == g.device
      assert new_g.idtype == g.idtype
      assert new_g.num_nodes() == g.num_edges()
      src, dst = new_g.edges()
      eset = set(zip(list(F.asnumpy(src)), list(F.asnumpy(dst))))
      assert eset == {(0, 1), (0, 2), (1, 0)}
  
      transform = dgl.LineGraph(backtracking=False)
      new_g = transform(g)
      assert new_g.device == g.device
      assert new_g.idtype == g.idtype
      assert new_g.num_nodes() == g.num_edges()
      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 37 for calling a global function with example usage: test_module_line_graph(idtype) without return types