code: def test_batch():
      # Check stored bounding boxes and leaf counts after instantiating from batch
      branches = []
      tree.map_branches(tree.root, op=tree._get_nodes, stack=branches)
      leafcount = tree._count_leaves(tree.root)
      assert leafcount == n
      for branch in branches:
          leafcount = tree._count_leaves(branch)
          assert leafcount == branch.n
          bbox = tree.get_bbox(branch)
          assert (bbox == branch.b).all()
  
file_path: rrcf/test/test_rrcf.py
imports: import json
  import numpy
  import rrcf
label_desc: Use image node_id 1 for calling a global function with example usage: test_batch() without return types