class_docstr: Abstract class to evaluate whether a trial should stop conditional on all
  results so far.
class_docstr_tok: ["Abstract","class","to","evaluate","whether","a","trial","should","stop","conditional","on","all","results","so","far","."]
docstr: Args:
      trial (sherpa.Trial): trial to be stopped.
      results (pandas.DataFrame): all results so far.
      lower_is_better (bool): whether lower objective values are better.
  
  Returns:
      bool: decision.
docstr_tok: ["Args",":","trial","(","sherpa.Trial",")",":","trial","to","be","stopped",".","results","(","pandas.DataFrame",")",":","all","results","so","far",".","lower_is_better","(","bool",")",":","whether","lower","objective","values","are","better",".","Returns",":","bool",":","decision","."]
code: def should_trial_stop(self, trial, results, lower_is_better):
      """
      Args:
          trial (sherpa.Trial): trial to be stopped.
          results (pandas.DataFrame): all results so far.
          lower_is_better (bool): whether lower objective values are better.
  
      Returns:
          bool: decision.
      """
      raise NotImplementedError(
          "StoppingRule class is not usable itself."
      )
  
imports: import os
  import random
  import numpy
  import logging
  import sherpa
  import pandas
  import sklearn.gaussian_process
  from sherpa.core import Choice, Continuous, Discrete, Ordinal, AlgorithmState
  from sherpa.core import rng
  import sklearn.model_selection
  import collections
label_desc: Use image node_id 1 for calling the StoppingRule obj's underlying member method code with example usage: obj.should_trial_stop(trial, results, lower_is_better) without return types