code: def test_batch_unbatch1(idtype):
      t1 = tree1(idtype)
      t2 = tree2(idtype)
      b1 = dgl.batch([t1, t2])
      b2 = dgl.batch([t2, b1])
      assert b2.num_nodes() == 15
      assert b2.num_edges() == 12
      assert b2.batch_size == 3
      assert F.allclose(b2.batch_num_nodes(), F.tensor([5, 5, 5]))
      assert F.allclose(b2.batch_num_edges(), F.tensor([4, 4, 4]))
  
      s1, s2, s3 = dgl.unbatch(b2)
      assert F.allclose(t2.ndata["h"], s1.ndata["h"])
      assert F.allclose(t2.edata["h"], s1.edata["h"])
      assert F.allclose(t1.ndata["h"], s2.ndata["h"])
      assert F.allclose(t1.edata["h"], s2.edata["h"])
      assert F.allclose(t2.ndata["h"], s3.ndata["h"])
      assert F.allclose(t2.edata["h"], s3.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 4 for calling a global function with example usage: test_batch_unbatch1(idtype) without return types