code: def volume_shell(loglike, ndim):
      """compute volume enclosed at loglike threshold"""
      sqr_deviation = -2 * loglike * (0.004) ** 2
      # how far are we from the center of the shell?
      deviation = sqr_deviation**0.5
  
      if deviation >= 0.1:
          # the volume is still touching the unit cube
          return np.nan
  
      # so 0.4 +- deviation is the current shell
      outer_volume = nsphere_volume(0.4 + deviation, ndim)
  
      if deviation >= 0.4:
          # all of the enclosed volume is contained
          inner_volume = 0
      else:
          inner_volume = nsphere_volume(0.4 - deviation, ndim)
  
      volume = outer_volume - inner_volume
      return volume
  
imports: import numpy
  from math import gamma, pi, exp
label_desc: Use image node_id 21 for calling a global function with example usage: volume_shell(loglike, ndim) and returns: volume, np