code: def finite_iterations(self):
      if self.iters is not None:
          if self.iters_done >= (self.iters - 1):
              self.stop_global = True
  
      if self.maxiter is not None:  # Stop for infeasible sampling
          if self.iters_done >= (self.maxiter - 1):
              self.stop_global = True
      return self.stop_global
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  import time
  import logging
  import warnings
  from scipy import spatial
  from scipy.optimize import OptimizeResult, minimize
  from scipy.optimize._shgo_lib import sobol_seq
  from scipy.optimize._shgo_lib.triangulation import Complex
label_desc: Use image node_id 6 for calling the SHGO obj's underlying member method code with example usage: obj.finite_iterations() and returns: self