code: def test_batch_unbatch(idtype):
      t1 = tree1(idtype)
      t2 = tree2(idtype)
  
      bg = dgl.batch([t1, t2])
      assert bg.num_nodes() == 10
      assert bg.num_edges() == 8
      assert bg.batch_size == 2
      assert F.allclose(bg.batch_num_nodes(), F.tensor([5, 5]))
      assert F.allclose(bg.batch_num_edges(), F.tensor([4, 4]))
  
      tt1, tt2 = dgl.unbatch(bg)
      assert F.allclose(t1.ndata["h"], tt1.ndata["h"])
      assert F.allclose(t1.edata["h"], tt1.edata["h"])
      assert F.allclose(t2.ndata["h"], tt2.ndata["h"])
      assert F.allclose(t2.edata["h"], tt2.edata["h"])
  
file_path: dgl/tests/python/common/test_batch-graph.py
imports: import unittest
  import backend
  import dgl
  import numpy
  from utils import parametrize_idtype
label_desc: Use image node_id 3 for calling a global function with example usage: test_batch_unbatch(idtype) without return types