class_docstr: A dictionary of :class:`Space` instances.
  
  Elements of this space are (ordered) dictionaries of elements from the constituent spaces.
  
  Example usage:
  
      >>> from gym.spaces import Dict, Discrete
      >>> observation_space = Dict({"position": Discrete(2), "velocity": Discrete(3)})
      >>> observation_space.sample()
      OrderedDict([('position', 1), ('velocity', 2)])
  
  Example usage [nested]::
  
      >>> from gym.spaces import Box, Dict, Discrete, MultiBinary, MultiDiscrete
      >>> Dict(
      ...     {
      ...         "ext_controller": MultiDiscrete([5, 2, 2]),
      ...         "inner_state": Dict(
      ...             {
      ...                 "charge": Discrete(100),
      ...                 "system_checks": MultiBinary(10),
      ...                 "job_status": Dict(
      ...                     {
      ...                         "task": Discrete(5),
      ...                         "progress": Box(low=0, high=100, shape=()),
      ...                     }
      ...                 ),
      ...             }
      ...         ),
      ...     }
      ... )
  
  It can be convenient to use :class:`Dict` spaces if you want to make complex observations or actions more human-readable.
  Usually, it will not be possible to use elements of this space directly in learning code. However, you can easily
  convert `Dict` observations to flat arrays by using a :class:`gym.wrappers.FlattenObservation` wrapper. Similar wrappers can be
  implemented to deal with :class:`Dict` actions.
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 `Dict` 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.
  * Dict - Using all the keys in the seed dictionary, the values are used to seed the subspaces. This allows the seeding of multiple composite subspaces (`Dict["space": Dict[...], ...]` with `{"space": {...}, ...}`).
  
  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","`","Dict","`","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",".","*","Dict","-","Using","all","the","keys","in","the","seed","dictionary",",","the","values","are","used","to","seed","the","subspaces",".","This","allows","the","seeding","of","multiple","composite","subspaces","(","`","Dict","[","``","space","''",":","Dict","[","...","]",",","...","]","`","with","`","{","``","space","''",":","{","...","}",",","...","}","`",")",".","Args",":","seed",":","An","optional","list","of","ints","or","int","to","seed","the","(","sub-",")","spaces","."]
code: def seed(self, seed: Optional[Union[dict, int]] = None) -> list:
      """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 `Dict` 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.
      * Dict - Using all the keys in the seed dictionary, the values are used to seed the subspaces. This allows the seeding of multiple composite subspaces (`Dict["space": Dict[...], ...]` with `{"space": {...}, ...}`).
  
      Args:
          seed: An optional list of ints or int to seed the (sub-)spaces.
      """
      seeds = []
  
      if isinstance(seed, dict):
          assert (
              seed.keys() == self.spaces.keys()
          ), f"The seed keys: {seed.keys()} are not identical to space keys: {self.spaces.keys()}"
          for key in seed.keys():
              seeds += self.spaces[key].seed(seed[key])
      elif isinstance(seed, int):
          seeds = super().seed(seed)
          # Using `np.int32` will mean that the same key occurring is extremely low, even for large subspaces
          subseeds = self.np_random.integers(
              np.iinfo(np.int32).max, size=len(self.spaces)
          )
          for subspace, subseed in zip(self.spaces.values(), subseeds):
              seeds += subspace.seed(int(subseed))
      elif seed is None:
          for space in self.spaces.values():
              seeds += space.seed(None)
      else:
          raise TypeError(
              f"Expected seed type: dict, int or None, actual type: {type(seed)}"
          )
  
      return seeds
  
imports: from collections import OrderedDict
  from collections.abc import Mapping, Sequence
  from typing import Any
  from typing import Dict
  from typing import List, Optional
  from typing import Sequence
  from typing import Tuple, Union
  import numpy
  from gym.spaces.space import Space
label_desc: Use image node_id 3 for calling the Dict obj's underlying member method code with example usage: obj.seed(seed) and returns: seeds