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: Get the number of subspaces that are involved in the cartesian product.
docstr_tok: ["Get","the","number","of","subspaces","that","are","involved","in","the","cartesian","product","."]
code: def __len__(self) -> int:
      """Get the number of subspaces that are involved in the cartesian product."""
      return len(self.spaces)
  
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 10 for calling the Tuple obj's underlying member method code with example usage: obj.__len__() and returns: len