class_docstr: AbstractSampler base class for optimizer-directed samplers
      
docstr: sample npts using vectorized solvers
  
  Args:
    if_terminated (bool, default=None): the amount of termination; must be one
      of ``{all, True, any, False, None}``
    reset_all (bool, default=True): action to take when ``if_terminated`` is met;
      must be one of ``{True, False, None}``
  
  Returns:
    None
  
  Notes:
    - When ``if_terminated`` is None, reset regardless of termination.
    - When ``if_terminated`` is True, reset if the best solver is terminated.
    - When ``if_terminated`` is False, reset if no solvers are terminated.
    - When ``if_terminated`` is all, reset if all solvers are terminated.
    - When ``if_terminated`` is any, reset if any solvers are terminated.
    - If ``reset_all`` is None, never reset.
    - If ``reset_all`` is True, reset all solvers if ``if_terminated`` is met.
    - If ``reset_all`` is False, similarly reset only the terminated solvers.
          
code: def sample(self, if_terminated=None, reset_all=True):  # , **kwds):
      """sample npts using vectorized solvers
  
      Args:
        if_terminated (bool, default=None): the amount of termination; must be one
          of ``{all, True, any, False, None}``
        reset_all (bool, default=True): action to take when ``if_terminated`` is met;
          must be one of ``{True, False, None}``
  
      Returns:
        None
  
      Notes:
        - When ``if_terminated`` is None, reset regardless of termination.
        - When ``if_terminated`` is True, reset if the best solver is terminated.
        - When ``if_terminated`` is False, reset if no solvers are terminated.
        - When ``if_terminated`` is all, reset if all solvers are terminated.
        - When ``if_terminated`` is any, reset if any solvers are terminated.
        - If ``reset_all`` is None, never reset.
        - If ``reset_all`` is True, reset all solvers if ``if_terminated`` is met.
        - If ``reset_all`` is False, similarly reset only the terminated solvers.
      """
      if type(reset_all) is bool:
          s = self._sampler
          if if_terminated is None:  # reset regardless
              return self._sample(
                  reset=(True if reset_all else None)
              )  # , **kwds)
          if not if_terminated in (all, True, any, False):
              msg = (
                  "%s not in (all, True, any, False, None)"
                  % if_terminated
              )
              raise ValueError(msg)
          stop = s.Terminated(all=True)
          if (
              all(stop)
              or (stop[s._is_best() or 0] and if_terminated is not all)
              or (any(stop) and if_terminated in (any, False))
              or (not any(stop) and if_terminated is False)
          ):
              return self._sample(
                  reset=(True if reset_all else None)
              )  # , **kwds)
          # othewise just take a step
          return self._sample(reset=False)  # , **kwds)
      return self._sample(reset=False)
  
file_path: mystic/mystic/abstract_sampler.py
label_desc: Use image node_id 6 for calling the AbstractSampler obj's underlying member method code with example usage: obj.sample(if_terminated, reset_all) and returns: self, self, self, self