code: def test_line_graph1():
      N = 5
      G = dgl.from_networkx(nx.star_graph(N)).to(F.ctx())
      G.edata["h"] = F.randn((2 * N, D))
      L = G.line_graph(shared=True)
      assert L.num_nodes() == 2 * N
      assert F.allclose(L.ndata["h"], G.edata["h"])
      assert G.device == F.ctx()
  
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 4 for calling a global function with example usage: test_line_graph1() without return types