class_docstr: A tuple (more precisely: the cartesian product) of :class:`Space` instances.
  
  Elements of this space are tuples of elements of the constituent spaces.
  
  Example usage::
  
      >>> from gym.spaces import Box, Discrete
      >>> observation_space = Tuple((Discrete(2), Box(-1, 1, shape=(2,))))
      >>> observation_space.sample()
      (0, array([0.03633198, 0.42370757], dtype=float32))
class_docstr_tok: ["A","tuple","(","more","precisely",":","the","cartesian","product",")","of",":","class",":","`","Space","`","instances",".","Elements","of","this","space","are","tuples","of","elements","of","the","constituent","spaces",".","Example","usage",":",":",">",">",">","from","gym.spaces","import","Box",",","Discrete",">",">",">","observation_space","=","Tuple","(","(","Discrete","(","2",")",",","Box","(","-1",",","1",",","shape=","(","2",",",")",")",")",")",">",">",">","observation_space.sample","(",")","(","0",",","array","(","[","0.03633198",",","0.42370757","]",",","dtype=float32",")",")"]
docstr: Constructor of :class:`Tuple` space.
  
  The generated instance will represent the cartesian product :math:`\text{spaces}[0] \times ... \times \text{spaces}[-1]`.
  
  Args:
      spaces (Iterable[Space]): The spaces that are involved in the cartesian product.
      seed: Optionally, you can use this argument to seed the RNGs of the ``spaces`` to ensure reproducible sampling.
docstr_tok: ["Constructor","of",":","class",":","`","Tuple","`","space",".","The","generated","instance","will","represent","the","cartesian","product",":","math",":","`","\\text","{","spaces","}","[","0","]","\\times","...","\\times","\\text","{","spaces","}","[","-1","]","`",".","Args",":","spaces","(","Iterable","[","Space","]",")",":","The","spaces","that","are","involved","in","the","cartesian","product",".","seed",":","Optionally",",","you","can","use","this","argument","to","seed","the","RNGs","of","the","``","spaces","``","to","ensure","reproducible","sampling","."]
code: def __init__(
      self,
      spaces: Iterable[Space],
      seed: Optional[
          Union[int, TypingSequence[int], np.random.Generator]
      ] = None,
  ):
      r"""Constructor of :class:`Tuple` space.
  
      The generated instance will represent the cartesian product :math:`\text{spaces}[0] \times ... \times \text{spaces}[-1]`.
  
      Args:
          spaces (Iterable[Space]): The spaces that are involved in the cartesian product.
          seed: Optionally, you can use this argument to seed the RNGs of the ``spaces`` to ensure reproducible sampling.
      """
      self.spaces = tuple(spaces)
      for space in self.spaces:
          assert isinstance(
              space, Space
          ), "Elements of the tuple must be instances of gym.Space"
      super().__init__(None, None, seed)
  
imports: from collections.abc import Sequence
  from typing import Iterable, Optional
  from typing import Sequence
  from typing import Tuple
  from typing import Union
  import numpy
  from gym.spaces.space import Space
label_desc: Use image node_id 1 to create a new Tuple object from inherited base classes: Space, CollectionSequence with example: obj = Tuple(spaces, seed)