class_docstr: Nested sampler with reactive exploration strategy.
  
  Storage & resume capable, optionally MPI parallelised.
class_docstr_tok: ["Nested","sampler","with","reactive","exploration","strategy",".","Storage","&","resume","capable",",","optionally","MPI","parallelised","."]
docstr: Check if node needs new children.
  
  Returns
  -------
  expand_node: bool
      True if should sample a new point
      based on this node (above its likelihood value Lmin).
  
  Parameters
  ----------
  it: int
      current iteration
  node: node
      The node to consider
  parallel_values: array of floats
      loglikelihoods of live points
  max_ncalls: int
      maximum number of likelihood function calls allowed
  max_iters: int
      maximum number of nested sampling iteration allowed
  Llo: float
      lower loglikelihood bound for the strategy
  Lhi: float
      upper loglikelihood bound for the strategy
  minimal_widths_sequence: list
      list of likelihood intervals with minimum number of live points
  target_min_num_children:
      minimum number of live points currently targeted
  live_points_healthy: bool
      indicates whether the live points have become
      linearly dependent (covariance not full rank)
      or have attained the same exact value in some parameter.
docstr_tok: ["Check","if","node","needs","new","children",".","Returns","--","--","--","-","expand_node",":","bool","True","if","should","sample","a","new","point","based","on","this","node","(","above","its","likelihood","value","Lmin",")",".","Parameters","--","--","--","--","--","it",":","int","current","iteration","node",":","node","The","node","to","consider","parallel_values",":","array","of","floats","loglikelihoods","of","live","points","max_ncalls",":","int","maximum","number","of","likelihood","function","calls","allowed","max_iters",":","int","maximum","number","of","nested","sampling","iteration","allowed","Llo",":","float","lower","loglikelihood","bound","for","the","strategy","Lhi",":","float","upper","loglikelihood","bound","for","the","strategy","minimal_widths_sequence",":","list","list","of","likelihood","intervals","with","minimum","number","of","live","points","target_min_num_children",":","minimum","number","of","live","points","currently","targeted","live_points_healthy",":","bool","indicates","whether","the","live","points","have","become","linearly","dependent","(","covariance","not","full","rank",")","or","have","attained","the","same","exact","value","in","some","parameter","."]
code: def _should_node_be_expanded(
      self,
      it,
      Llo,
      Lhi,
      minimal_widths_sequence,
      target_min_num_children,
      node,
      parallel_values,
      max_ncalls,
      max_iters,
      live_points_healthy,
  ):
      """Check if node needs new children.
  
      Returns
      -------
      expand_node: bool
          True if should sample a new point
          based on this node (above its likelihood value Lmin).
  
      Parameters
      ----------
      it: int
          current iteration
      node: node
          The node to consider
      parallel_values: array of floats
          loglikelihoods of live points
      max_ncalls: int
          maximum number of likelihood function calls allowed
      max_iters: int
          maximum number of nested sampling iteration allowed
      Llo: float
          lower loglikelihood bound for the strategy
      Lhi: float
          upper loglikelihood bound for the strategy
      minimal_widths_sequence: list
          list of likelihood intervals with minimum number of live points
      target_min_num_children:
          minimum number of live points currently targeted
      live_points_healthy: bool
          indicates whether the live points have become
          linearly dependent (covariance not full rank)
          or have attained the same exact value in some parameter.
  
      """
      Lmin = node.value
      nlive = len(parallel_values)
  
      if not (Lmin <= Lhi and Llo <= Lhi):
          return False
  
      if not live_points_healthy:
          if self.log:
              self.logger.debug(
                  "not expanding, because live points are linearly dependent"
              )
          return False
  
      # some reasons to stop:
      if it > 0:
          if max_ncalls is not None and self.ncall >= max_ncalls:
              # print("not expanding, because above max_ncall")
              return False
  
          if max_iters is not None and it >= max_iters:
              # print("not expanding, because above max_iters")
              return False
  
      # in a plateau, only shrink (Fowlie+2020)
      if (Lmin == parallel_values).sum() > 1:
          if self.log:
              self.logger.debug(
                  "Plateau detected at L=%e, not replacing live point."
                  % Lmin
              )
          return False
  
      expand_node = False
      # we should continue to progress towards Lhi
      while Lmin > minimal_widths_sequence[0][0]:
          minimal_widths_sequence.pop(0)
  
      # get currently desired width
      if self.region is None:
          minimal_width_clusters = 0
      else:
          # compute number of clusters with more than 1 element
          _, cluster_sizes = np.unique(
              self.region.transformLayer.clusterids, return_counts=True
          )
          nclusters = (cluster_sizes > 1).sum()
          minimal_width_clusters = (
              self.cluster_num_live_points * nclusters
          )
  
      minimal_width = max(
          minimal_widths_sequence[0][1], minimal_width_clusters
      )
  
      # if already has children, no need to expand
      # if we are wider than the width required
      # we do not need to expand this one
      # expand_node = len(node.children) == 0
      # prefer 1 child, or the number required, if specified
      nmin = (
          target_min_num_children.get(node.id, 1)
          if target_min_num_children
          else 1
      )
      expand_node = len(node.children) < nmin
      # print("not expanding, because we are quite wide", nlive, minimal_width, minimal_widths_sequence)
      # but we have to expand the first iteration,
      # otherwise the integrator never sets H
      too_wide = nlive > minimal_width and it > 0
  
      return expand_node and not too_wide
  
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 14 for calling the ReactiveNestedSampler obj's underlying member method code with example usage: obj._should_node_be_expanded(it, Llo, Lhi, minimal_widths_sequence, target_min_num_children, node, parallel_values, max_ncalls, max_iters, live_points_healthy) and returns: unknown, False, False, False, False, False