class_docstr: This space represent sets of finite-length sequences.
  
  This space represents the set of tuples of the form :math:`(a_0, \dots, a_n)` where the :math:`a_i` belong
  to some space that is specified during initialization and the integer :math:`n` is not fixed
  
  Example::
      >>> space = Sequence(Box(0, 1))
      >>> space.sample()
      (array([0.0259352], dtype=float32),)
      >>> space.sample()
      (array([0.80977976], dtype=float32), array([0.80066574], dtype=float32), array([0.77165383], dtype=float32))
class_docstr_tok: ["This","space","represent","sets","of","finite-length","sequences",".","This","space","represents","the","set","of","tuples","of","the","form",":","math",":","`","(","a_0",",","\\dots",",","a_n",")","`","where","the",":","math",":","`","a_i","`","belong","to","some","space","that","is","specified","during","initialization","and","the","integer",":","math",":","`","n","`","is","not","fixed","Example",":",":",">",">",">","space","=","Sequence","(","Box","(","0",",","1",")",")",">",">",">","space.sample","(",")","(","array","(","[","0.0259352","]",",","dtype=float32",")",",",")",">",">",">","space.sample","(",")","(","array","(","[","0.80977976","]",",","dtype=float32",")",",","array","(","[","0.80066574","]",",","dtype=float32",")",",","array","(","[","0.77165383","]",",","dtype=float32",")",")"]
docstr: Constructor of the :class:`Sequence` space.
  
  Args:
      space: Elements in the sequences this space represent must belong to this space.
      seed: Optionally, you can use this argument to seed the RNG that is used to sample from the space.
docstr_tok: ["Constructor","of","the",":","class",":","`","Sequence","`","space",".","Args",":","space",":","Elements","in","the","sequences","this","space","represent","must","belong","to","this","space",".","seed",":","Optionally",",","you","can","use","this","argument","to","seed","the","RNG","that","is","used","to","sample","from","the","space","."]
code: def __init__(
      self,
      space: Space,
      seed: Optional[Union[int, np.random.Generator]] = None,
  ):
      """Constructor of the :class:`Sequence` space.
  
      Args:
          space: Elements in the sequences this space represent must belong to this space.
          seed: Optionally, you can use this argument to seed the RNG that is used to sample from the space.
      """
      assert isinstance(
          space, gym.Space
      ), f"Expects the feature space to be instance of a gym Space, actual type: {type(space)}"
      self.feature_space = space
      super().__init__(None, None, seed)  # type: ignore
  
file_path: gym/gym/spaces/sequence.py
imports: from collections.abc import Sequence
  from typing import Any, List, Optional, Tuple, Union
  import numpy
  import gym
  from gym.spaces.space import Space
label_desc: Use image node_id 1 to create a new Sequence object from inherited base classes: Space with example: obj = Sequence(space, seed)