class_docstr: An Agent class for all optimization techniques.
class_docstr_tok: ["An","Agent","class","for","all","optimization","techniques","."]
code: def fit(self, fit: Union[int, float]) -> None:
      if not isinstance(fit, (float, int, np.int32, np.int64)):
          raise e.TypeError("`fit` should be a float or integer")
  
      self._fit = fit
  
imports: import time
  from typing import Dict, List, Optional, Union
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.constant
  import opytimizer.utils.exception
  from opytimizer.utils import logging
label_desc: Use image node_id 9 for calling the Agent obj's underlying member method code with example usage: obj.fit(fit) without return types