code: def _combine(combop, b, name, xs, branching_factor=100):
      assert isinstance(branching_factor, int) and branching_factor >= 1
      n_levels = math.ceil(math.log(len(xs), branching_factor))
      level_digits = digits_needed(n_levels)
  
      level = 0
      while level < n_levels:
          branch_digits = digits_needed(
              len(xs) // branching_factor
              + min(len(xs) % branching_factor, 1)
          )
          grouped_xs = grouped(branching_factor, xs)
          xs = [
              combop(
                  b,
                  f"{name}-{level:0{level_digits}}-{i:0{branch_digits}}",
                  xs,
              )
              for i, xs in enumerate(grouped_xs)
          ]
          level += 1
      assert len(xs) == 1
      return xs[0]
  
file_path: hail/hail/python/hailtop/batch/utils.py
imports: import math
  from typing import List, Optional
  from ..utils.utils import grouped, digits_needed
  from .batch import Batch
  from .exceptions import BatchException
  from .resource import ResourceGroup, ResourceFile
label_desc: Use image node_id 3 for calling a global function with example usage: _combine(combop, b, name, xs, branching_factor) and returns: xs