class_docstr: {0,1,...,n-1}
  
  Example usage:
  self.observation_space = spaces.Discrete(2)
code: def contains(self, x):
      if isinstance(x, int):
          as_int = x
      elif isinstance(x, (np.generic, np.ndarray)) and (
          x.dtype.kind in np.typecodes["AllInteger"] and x.shape == ()
      ):
          as_int = int(x)
      else:
          return False
      return as_int >= 0 and as_int < self.n
  
file_path: keras-rl/utils/gym/spaces/discrete.py
imports: import numpy
  import gym
  from ..None import prng
label_desc: Use image node_id 3 for calling the Discrete obj's underlying member method code with example usage: obj.contains(x) and returns: unknown, False