class_docstr: A DiscreteSearchCallback class that handles mapping floating-point variables
  to discrete values.
code: def allowed_values(
      self, allowed_values: List[Union[int, float]]
  ) -> None:
      if not isinstance(allowed_values, list):
          raise e.TypeError("`allowed_values` should be a list")
  
      self._allowed_values = allowed_values
  
imports: from typing import List, TypeVar, Union
  import numpy
  import opytimizer.utils.exception
  from opytimizer.core.space import Space
label_desc: Use image node_id 3 for calling the DiscreteSearchCallback obj's underlying member method code with example usage: obj.allowed_values(allowed_values) without return types