code: def fillpts(lb, ub, npts, data=None, rtol=None, dist=None):
      """
      takes lower and upper bounds (e.g. lb = [0,3], ub = [2,4])
      finds npts that are at least rtol away from legacy data
      produces a list of sample points s = [[1,3],[1,4],[2,3],[2,4]]
  
      Inputs:
          lb  --  a list of the lower bounds
          ub  --  a list of the upper bounds
          npts  --  number of sample points
          data  --  a list of legacy sample points
          rtol  --  target radial distance from each point
          dist  --  a mystic.math.Distribution instance (or list of Distributions)
  
      Notes: if rtol is None, use max rtol; if rtol < 0, use quick-n-dirty method
      """
      bounds = list(zip(lb, ub))
      from mystic.math.distance import euclidean as metric
  
      # XXX: expose solver settings to user? #XXX: better npop,ftol? faster?
      ###if rtol is None or type(rtol) in (int, float):
      from mystic.solvers import diffev as solver
  
      kwds = dict(npop=20, ftol=1e-4, gtol=None, disp=0, full_output=0)
      ###initial = lambda : bounds
      ###else: # assume it's a string
      #   from mystic.solvers import fmin_powell as solver
      #   kwds = dict(xtol=1e-8, ftol=1e-8, gtol=2, disp=0, full_output=0)
      #   if rtol == 'None': rtol = None
      #   else: rtol = float(rtol)
      #   import random as rd
      #   initial = lambda : [rd.randrange(l,u)+rd.random() for (l,u) in bounds]
      # from numpy import round
      # kwds['constraints'] = lambda x: round(x, 3)
      # copy the legacy data points (e.g. monitor.x) #XXX: more efficient method?
      pts = [] if data is None else list(data)
      # 'min', 'np.sum()', 'np.min()' are also a choice of distance metric
      if rtol and rtol < 0:  # neg radius uses quick-n-dirty method
  
          def holes(x):
              return (metric(pts, x, axis=0).min(axis=0) < -rtol).sum()
  
      elif rtol is None:  # no radius finds max distance away
  
          def holes(x):
              res = metric(pts, x, axis=0).min()
              return -res
  
      else:  # all points should be at least rtol away
  
          def holes(x):
              res = metric(pts, x, axis=0).min()
              return -res if res < rtol else 0.0
  
      # iteratively find a point away from all other points
      for pt in range(npts):
          res = solver(holes, x0=bounds, bounds=bounds, **kwds)
          # res,cost = res[0],res[1]
          pts.append(res.ravel().tolist())
      pts = pts[-npts:]
      # inject some randomness #XXX: what are alternatives? some sampling?
      if dist is None:
          return pts
      if not len(pts):
          return pts
      if hasattr(dist, "__len__"):  # FIXME: isiterable
          import numpy as np
  
          pts += np.array(tuple(di(len(pts)) for di in dist)).T
      else:
          pts += dist((len(pts), len(pts[0])))
      return pts.tolist()
  
label_desc: Use image node_id 3 for calling a global function with example usage: fillpts(lb, ub, npts, data, rtol, dist) and returns: pts, pts, pts, unknown, unknown, unknown