class_docstr: Metropolis acceptance criterion.
  
  Parameters
  ----------
  T : float
      The "temperature" parameter for the accept or reject criterion.
  random_gen : {None, int, `numpy.random.Generator`,
                `numpy.random.RandomState`}, optional
  
      If `seed` is None (or `np.random`), the `numpy.random.RandomState`
      singleton is used.
      If `seed` is an int, a new ``RandomState`` instance is used,
      seeded with `seed`.
      If `seed` is already a ``Generator`` or ``RandomState`` instance then
      that instance is used.
      Random number generator used for acceptance test.
class_docstr_tok: ["Metropolis","acceptance","criterion",".","Parameters","--","--","--","--","--","T",":","float","The","``","temperature","''","parameter","for","the","accept","or","reject","criterion",".","random_gen",":","{","None",",","int",",","`","numpy.random.Generator","`",",","`","numpy.random.RandomState","`","}",",","optional","If","`","seed","`","is","None","(","or","`","np.random","`",")",",","the","`","numpy.random.RandomState","`","singleton","is","used",".","If","`","seed","`","is","an","int",",","a","new","``","RandomState","``","instance","is","used",",","seeded","with","`","seed","`",".","If","`","seed","`","is","already","a","``","Generator","``","or","``","RandomState","``","instance","then","that","instance","is","used",".","Random","number","generator","used","for","acceptance","test","."]
docstr: f_new and f_old are mandatory in kwargs
docstr_tok: ["f_new","and","f_old","are","mandatory","in","kwargs"]
code: def __call__(self, **kwargs):
      """
      f_new and f_old are mandatory in kwargs
      """
      return bool(self.accept_reject(kwargs["f_new"], kwargs["f_old"]))
  
imports: import numpy
  import math
  from numpy import cos, sin
  import scipy.optimize
  from scipy._lib._util import check_random_state
label_desc: Use image node_id 3 for calling the Metropolis obj's underlying member method code with example usage: obj.__call__() and returns: bool