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: Seed the PRNG of this space and all subspaces.
  
  Depending on the type of seed, the subspaces will be seeded differently
  * None - All the subspaces will use a random initial seed
  * Int - The integer is used to seed the `Tuple` space that is used to generate seed values for each of the subspaces. Warning, this does not guarantee unique seeds for all of the subspaces.
  * List - Values used to seed the subspaces. This allows the seeding of multiple composite subspaces (`List(42, 54, ...)`).
  
  Args:
      seed: An optional list of ints or int to seed the (sub-)spaces.
docstr_tok: ["Seed","the","PRNG","of","this","space","and","all","subspaces",".","Depending","on","the","type","of","seed",",","the","subspaces","will","be","seeded","differently","*","None","-","All","the","subspaces","will","use","a","random","initial","seed","*","Int","-","The","integer","is","used","to","seed","the","`","Tuple","`","space","that","is","used","to","generate","seed","values","for","each","of","the","subspaces",".","Warning",",","this","does","not","guarantee","unique","seeds","for","all","of","the","subspaces",".","*","List","-","Values","used","to","seed","the","subspaces",".","This","allows","the","seeding","of","multiple","composite","subspaces","(","`","List","(","42",",","54",",","...",")","`",")",".","Args",":","seed",":","An","optional","list","of","ints","or","int","to","seed","the","(","sub-",")","spaces","."]
code: def seed(
      self, seed: Optional[Union[int, TypingSequence[int]]] = None
  ) -> TypingSequence[int]:
      """Seed the PRNG of this space and all subspaces.
  
      Depending on the type of seed, the subspaces will be seeded differently
      * None - All the subspaces will use a random initial seed
      * Int - The integer is used to seed the `Tuple` space that is used to generate seed values for each of the subspaces. Warning, this does not guarantee unique seeds for all of the subspaces.
      * List - Values used to seed the subspaces. This allows the seeding of multiple composite subspaces (`List(42, 54, ...)`).
  
      Args:
          seed: An optional list of ints or int to seed the (sub-)spaces.
      """
      seeds = []
  
      if isinstance(seed, CollectionSequence):
          assert len(seed) == len(
              self.spaces
          ), f"Expects that the subspaces of seeds equals the number of subspaces. Actual length of seeds: {len(seeds)}, length of subspaces: {len(self.spaces)}"
          for subseed, space in zip(seed, self.spaces):
              seeds += space.seed(subseed)
      elif isinstance(seed, int):
          seeds = super().seed(seed)
          subseeds = self.np_random.integers(
              np.iinfo(np.int32).max, size=len(self.spaces)
          )
          for subspace, subseed in zip(self.spaces, subseeds):
              seeds += subspace.seed(int(subseed))
      elif seed is None:
          for space in self.spaces:
              seeds += space.seed(seed)
      else:
          raise TypeError(
              f"Expected seed type: list, tuple, int or None, actual type: {type(seed)}"
          )
  
      return seeds
  
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 3 for calling the Tuple obj's underlying member method code with example usage: obj.seed(seed) and returns: seeds