class_docstr: A (possibly unbounded) box in :math:`\mathbb{R}^n`.
  
  Specifically, a Box represents the Cartesian product of n closed intervals.
  Each interval has the form of one of :math:`[a, b]`, :math:`(-\infty, b]`,
  :math:`[a, \infty)`, or :math:`(-\infty, \infty)`.
  
  There are two common use cases:
  
  * Identical bound for each dimension::
  
      >>> Box(low=-1.0, high=2.0, shape=(3, 4), dtype=np.float32)
      Box(3, 4)
  
  * Independent bound for each dimension::
  
      >>> Box(low=np.array([-1.0, -2.0]), high=np.array([2.0, 4.0]), dtype=np.float32)
      Box(2,)
docstr: Return boolean specifying if x is a valid member of this space.
docstr_tok: ["Return","boolean","specifying","if","x","is","a","valid","member","of","this","space","."]
code: def contains(self, x) -> bool:
      """Return boolean specifying if x is a valid member of this space."""
      if not isinstance(x, np.ndarray):
          logger.warn("Casting input x to numpy array.")
          try:
              x = np.asarray(x, dtype=self.dtype)
          except (ValueError, TypeError):
              return False
  
      return bool(
          np.can_cast(x.dtype, self.dtype)
          and x.shape == self.shape
          and np.all(x >= self.low)
          and np.all(x <= self.high)
      )
  
imports: from typing import Dict, List, Optional, Sequence, SupportsFloat, Tuple, Type, Union
  import numpy
  import gym.error
  from gym import logger
  from gym.spaces.space import Space
label_desc: Use image node_id 6 for calling the Box obj's underlying member method code with example usage: obj.contains(x) and returns: bool, False