code: def sampled_mean(pts, lb, ub):
      from numpy import inf
  
      f = wrap_bounds(model, lb, ub)
      ave = 0
      count = 0
      for i in range(len(pts[0])):
          Fx = f([pts[0][i], pts[1][i], pts[2][i]])
          if Fx != -inf:  # outside of bounds evaluates to -inf
              ave += Fx
              count += 1
      if not count:
          return None  # XXX: define 0/0 = None
      ave = float(ave) / float(count)
      return ave
  
file_path: mystic/examples4/TEST_surrogate_samples.py
imports: from TEST_surrogate_diam import *
  from mystic.math.stats import volume, prob_mass, mean, mcdiarmid_bound
  from mystic.math.integrate import integrate
  from mystic.math.samples import random_samples, sampled_pts, sampled_prob
  from mystic.math.samples import alpha, _pof_given_samples
  from mystic.tools import wrap_bounds
label_desc: Use image node_id 1 for calling a global function with example usage: sampled_mean(pts, lb, ub) and returns: ave, None