code: def volume_shell(f_dist, m_dist):
      
      f_dist.sort()
      m_dist.sort()
      distances = numpy.concatenate([f_dist, m_dist])
      dist_sorting = distances.argsort()
      distances = distances[dist_sorting]
      low = 0
      vol = 0
      vol_err = 0
      for i in range(len(distances)):
          if i == len(distances) - 1:
              break
  
          high = (distances[i+1] + distances[i]) / 2
          bin_width = high - low
  
          if dist_sorting[i] < len(f_dist):
              vol += 4 * numpy.pi * distances[i]**2.0 * bin_width
              vol_err += (4 * numpy.pi * distances[i]**2.0 * bin_width)**2.0
  
          low = high
      vol_err = vol_err ** 0.5
      return vol, vol_err
docs: Compute the sensitive volume using sum over spherical shells.
  
      Parameters
      -----------
      f_dist: numpy.ndarray
          The distances of found injections
      m_dist: numpy.ndarray
          The distances of missed injections
  
      Returns
      --------
      volume: float
          Volume estimate
      volume_error: float
          The standard error in the volume