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: Store the transform and log-likelihood functions.
  
  if make_safe is set, make functions safer by accepting misformed
  return shapes and non-finite likelihood values.
docstr_tok: ["Store","the","transform","and","log-likelihood","functions",".","if","make_safe","is","set",",","make","functions","safer","by","accepting","misformed","return","shapes","and","non-finite","likelihood","values","."]
code: def _set_likelihood_function(
      self, transform, loglike, num_test_samples, make_safe=False
  ):
      """Store the transform and log-likelihood functions.
  
      if make_safe is set, make functions safer by accepting misformed
      return shapes and non-finite likelihood values.
      """
  
      def safe_loglike(x):
          """Safe wrapper of likelihood function."""
          x = np.asarray(x)
          if len(x.shape) == 1:
              assert x.shape[0] == self.x_dim
              x = np.expand_dims(x, 0)
          logl = loglike(x)
          if len(logl.shape) == 0:
              logl = np.expand_dims(logl, 0)
          logl[np.logical_not(np.isfinite(logl))] = -1e100
          return logl
  
      if make_safe:
          self.loglike = safe_loglike
      else:
          self.loglike = loglike
  
      if transform is None:
          self.transform = lambda x: x
      elif make_safe:
  
          def safe_transform(x):
              """Safe wrapper of transform function."""
              x = np.asarray(x)
              if len(x.shape) == 1:
                  assert x.shape[0] == self.x_dim
                  x = np.expand_dims(x, 0)
              return transform(x)
  
          self.transform = safe_transform
      else:
          self.transform = transform
  
      lims = np.ones((2, self.x_dim))
      lims[0, :] = 1e-6
      lims[1, :] = 1 - 1e-6
      self.transform_limits = self.transform(lims).transpose()
  
      self.volfactor = vol_prefactor(self.x_dim)
  
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 4 for calling the ReactiveNestedSampler obj's underlying member method code with example usage: obj._set_likelihood_function(transform, loglike, num_test_samples, make_safe) and returns: logl, transform