code: def test_edge_removal(idtype):
      g = create_graph(idtype, 5)
      for i in range(5):
          for j in range(5):
              g.add_edges(i, j)
      g.edata["id"] = F.arange(0, 25)
  
      # remove edges
      g.remove_edges(range(13, 20))
      assert g.num_nodes() == 5
      assert g.num_edges() == 18
      assert F.array_equal(
          g.edata["id"], F.tensor(list(range(13)) + list(range(20, 25)))
      )
      assert dgl.NID not in g.ndata
      assert dgl.EID not in g.edata
  
      # add edges
      g.add_edges(3, 3)
      assert g.num_nodes() == 5
      assert g.num_edges() == 19
      assert F.array_equal(
          g.edata["id"],
          F.tensor(list(range(13)) + list(range(20, 25)) + [0]),
      )
  
      # remove edges
      g.remove_edges(range(2, 10), store_ids=True)
      assert g.num_nodes() == 5
      assert g.num_edges() == 11
      assert F.array_equal(
          g.edata["id"],
          F.tensor([0, 1, 10, 11, 12, 20, 21, 22, 23, 24, 0]),
      )
      assert dgl.EID in g.edata
  
file_path: dgl/tests/python/common/test_heterograph-remove.py
imports: import backend
  import dgl
  import numpy
  from utils import parametrize_idtype
label_desc: Use image node_id 5 for calling a global function with example usage: test_edge_removal(idtype) without return types