class_docstr: AbstractSolver base class for mystic optimizers.
      
class_docstr_tok: ["AbstractSolver","base","class","for","mystic","optimizers","."]
docstr: Take a single optimization step using the given 'cost' function.
  
  Uses an optimization algorithm to take one 'step' toward the minimum of a
  function of one or more variables.
  
  Args:
      cost (func, default=None): the function to be minimized: ``y = cost(x)``.
      termination (termination, default=None): termination conditions.
      ExtraArgs (tuple, default=None): extra arguments for cost.
      callback (func, default=None): function to call after each iteration. The
          interface is ``callback(xk)``, with xk the current parameter vector.
      disp (bool, default=False): if True, print convergence messages.
  
  Returns:
      None
  
  Notes:
      - To run the solver until termination, call ``Solve()``. Alternately, use
        ``Terminated()`` as the stop condition in a while loop over ``Step``.
      - If the algorithm does not meet the given termination conditions after
        the call to ``Step``, the solver may be left in an "out-of-sync" state.
        When abandoning an non-terminated solver, one should call ``Finalize()``
        to make sure the solver is fully returned to a "synchronized" state.
      - This method accepts additional args that are specific for the current
        solver, as detailed in the ``_process_inputs`` method.
          
code: def Step(self, cost=None, termination=None, ExtraArgs=None, **kwds):
      """Take a single optimization step using the given 'cost' function.
  
      Uses an optimization algorithm to take one 'step' toward the minimum of a
      function of one or more variables.
  
      Args:
          cost (func, default=None): the function to be minimized: ``y = cost(x)``.
          termination (termination, default=None): termination conditions.
          ExtraArgs (tuple, default=None): extra arguments for cost.
          callback (func, default=None): function to call after each iteration. The
              interface is ``callback(xk)``, with xk the current parameter vector.
          disp (bool, default=False): if True, print convergence messages.
  
      Returns:
          None
  
      Notes:
          - To run the solver until termination, call ``Solve()``. Alternately, use
            ``Terminated()`` as the stop condition in a while loop over ``Step``.
          - If the algorithm does not meet the given termination conditions after
            the call to ``Step``, the solver may be left in an "out-of-sync" state.
            When abandoning an non-terminated solver, one should call ``Finalize()``
            to make sure the solver is fully returned to a "synchronized" state.
          - This method accepts additional args that are specific for the current
            solver, as detailed in the ``_process_inputs`` method.
      """
      if "disp" in kwds:
          disp = bool(kwds["disp"])  # ; del kwds['disp']
      else:
          disp = False
  
      # register: cost, termination, ExtraArgs
      cost = self._bootstrap_objective(cost, ExtraArgs)
      if termination is not None:
          self.SetTermination(termination)
  
      # check termination before 'stepping'
      if len(self._stepmon):
          msg = self.Terminated(disp=disp, info=True) or None
      else:
          msg = None
  
      # if not terminated, then take a step
      if msg is None:
          self._Step(**kwds)  # FIXME: not all kwds are given in __doc__
          if self.Terminated():  # then cleanup/finalize
              self.Finalize()
  
          # get termination message and log state
          msg = self.Terminated(disp=disp, info=True) or None
          if msg:
              self._stepmon.info('STOP("%s")' % msg)
              self.__save_state(force=True)
      return msg
  
imports: import random
  import numpy
  from numpy import inf, shape, asarray, absolute, asfarray, seterr
  from mystic.tools import wrap_function, wrap_nested, wrap_reducer
  from mystic.tools import wrap_bounds, wrap_penalty, reduced
  from klepto import isvalid, validate
  from collections.abc import Callable
label_desc: Use image node_id 47 for calling the AbstractSolver obj's underlying member method code with example usage: obj.Step(cost, termination, ExtraArgs) and returns: msg