code: def test_node_removal(idtype):
      g = create_graph(idtype, 10)
      g.add_edges(0, 0)
      assert g.num_nodes() == 10
      g.ndata["id"] = F.arange(0, 10)
  
      # remove nodes
      g.remove_nodes(range(4, 7))
      assert g.num_nodes() == 7
      assert F.array_equal(
          g.ndata["id"], F.tensor([0, 1, 2, 3, 7, 8, 9])
      )
      assert dgl.NID not in g.ndata
      assert dgl.EID not in g.edata
  
      # add nodes
      g.add_nodes(3)
      assert g.num_nodes() == 10
      assert F.array_equal(
          g.ndata["id"], F.tensor([0, 1, 2, 3, 7, 8, 9, 0, 0, 0])
      )
  
      # remove nodes
      g.remove_nodes(range(1, 4), store_ids=True)
      assert g.num_nodes() == 7
      assert F.array_equal(
          g.ndata["id"], F.tensor([0, 7, 8, 9, 0, 0, 0])
      )
      assert dgl.NID in g.ndata
      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 2 for calling a global function with example usage: test_node_removal(idtype) without return types