class_docstr: .. include:: /global.rst
  
  Please refer to |sobol| for details on this algorithm.
code: def optimize(self, f, maximize=True, pmap=map):
      sequence = Sobol.i4_sobol_generate(
          len(self.bounds), self.num_evals, self.skip
      )
      scaled = list(
          map(
              lambda x: util.scale_unit_to_bounds(
                  x, self.bounds.values()
              ),
              sequence,
          )
      )
  
      best_pars = None
  
      @functools.wraps(f)
      def fwrap(args):
          kwargs = dict(
              [(k, v) for k, v in zip(self.bounds.keys(), args)]
          )
          return f(**kwargs)
  
      if maximize:
          comp = lambda score, best: score > best
      else:
          comp = lambda score, best: score < best
  
      scores = pmap(fwrap, scaled)
      scores = map(util.score, scores)
  
      if maximize:
          comp = max
      else:
          comp = min
      best_idx, _ = comp(enumerate(scores), key=op.itemgetter(1))
      best_pars = scaled[best_idx]  # op.itemgetter(best_idx)(scaled)
      return (
          dict([(k, v) for k, v in zip(self.bounds.keys(), best_pars)]),
          None,
      )
  
imports: import math
  import operator
  import random
  import array
  import functools
  from ..functions import static_key_order
  from .solver_registry import register_solver
  from .util import Solver, _copydoc, uniform_in_bounds
  from .None import util
label_desc: Use image node_id 2 for calling the Sobol obj's underlying member method code with example usage: obj.optimize(f, maximize, pmap) and returns: dict,  None, f