code: def _update_region_bootstrap(
      region, nbootstraps, minvol=0.0, comm=None, mpi_size=1
  ):
      """
      Update *region* with *nbootstraps* rounds of excluding points randomly.
  
      Stiffen ellipsoid size using the minimum volume *minvol*.
  
      If the mpi communicator *comm* is not None, use MPI to distribute
      the bootstraps over the *mpi_size* processes.
      """
      assert nbootstraps > 0, nbootstraps
      # catch potential errors so MPI syncing still works
      e = None
      try:
          r, f = region.compute_enlargement(
              minvol=minvol, nbootstraps=max(1, nbootstraps // mpi_size)
          )
      except np.linalg.LinAlgError as e1:
          e = e1
          r, f = np.nan, np.nan
  
      if comm is not None:
          recv_maxradii = comm.gather(r, root=0)
          recv_maxradii = comm.bcast(recv_maxradii, root=0)
          # if there are very many processors, we may have more
          # rounds than requested, leading to slowdown
          # thus we throw away the extra ones
          r = np.max(recv_maxradii[:nbootstraps])
          recv_enlarge = comm.gather(f, root=0)
          recv_enlarge = comm.bcast(recv_enlarge, root=0)
          f = np.max(recv_enlarge[:nbootstraps])
  
      if not np.isfinite(r) and not np.isfinite(r):
          # reraise error if needed
          if e is None:
              raise np.linalg.LinAlgError("compute_enlargement failed")
          else:
              raise e
  
      region.maxradiussq = r
      region.enlarge = f
      return r, f
  
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 5 for calling a global function with example usage: _update_region_bootstrap(region, nbootstraps, minvol, comm, mpi_size) and returns: r,  f