class_docstr: An Agent class for all optimization techniques.
class_docstr_tok: ["An","Agent","class","for","all","optimization","techniques","."]
code: def mapping(self, mapping: List[str]) -> None:
      if mapping is not None:
          if not isinstance(mapping, list):
              raise e.TypeError("`mapping` should be a list")
          if len(mapping) != self.n_variables:
              raise e.SizeError(
                  "`mapping` should be the same size as `n_variables`"
              )
          self._mapping = mapping
      else:
          self._mapping = [f"x{i}" for i in range(self.n_variables)]
  
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 17 for calling the Agent obj's underlying member method code with example usage: obj.mapping(mapping) without return types