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: Iterator through the keys of the subspaces.
docstr_tok: ["Iterator","through","the","keys","of","the","subspaces","."]
code: def __iter__(self):
      """Iterator through the keys of the subspaces."""
      yield from self.spaces
  
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 8 for calling the Dict obj's underlying member method code with example usage: obj.__iter__() without return types