code: def _explore_iterator_batch(
      explorer, pop, x_dim, num_params, pointpile, batchsize=1
  ):
      batch = []
  
      while True:
          next_node = explorer.next_node()
          if next_node is None:
              break
          (
              rootid,
              node,
              (_, active_rootids, active_values, active_node_ids),
          ) = next_node
          Lmin = node.value
          children = []
  
          _, row = pop(Lmin)
          if row is not None:
              logl = row[1]
              u = row[3 : 3 + x_dim]
              v = row[3 + x_dim : 3 + x_dim + num_params]
  
              assert u.shape == (x_dim,)
              assert v.shape == (num_params,)
              assert logl > Lmin
              children.append((u, v, logl))
              child = pointpile.make_node(logl, u, v)
              node.children.append(child)
  
          batch.append((Lmin, active_values.copy(), children))
          if len(batch) >= batchsize:
              yield batch
              batch = []
          explorer.expand_children_of(rootid, node)
      if len(batch) > 0:
          yield batch
  
imports: from __future__ import print_function, division
  import os
  import sys
  import csv
  import json
  import operator
  import time
  import warnings
  from numpy import log, exp, logaddexp
  import numpy
  from .utils import create_logger, make_run_dir, resample_equal, vol_prefactor, vectorize, listify
  from .utils import is_affine_transform, normalised_kendall_tau_distance, distributed_work_chunk_size
  from ultranest.mlfriends import MLFriends, AffineLayer, ScalingLayer, find_nearby, WrappingEllipsoid, RobustEllipsoidRegion
  from .store import HDF5PointStore, TextPointStore, NullPointStore
  from .viz import get_default_viz_callback
  from .ordertest import UniformOrderAccumulator
  from .netiter import PointPile, SingleCounter, MultiCounter, BreadthFirstIterator, TreeNode, count_tree_between, find_nodes_before, logz_sequence
  from .netiter import dump_tree, combine_results
  from .hotstart import get_auxiliary_contbox_parameterization
label_desc: Use image node_id 3 for calling a global function with example usage: _explore_iterator_batch(explorer, pop, x_dim, num_params, pointpile, batchsize) without return types