class_docstr: Expands scalar shapes in the observation.
  
  For example, if the observation holds the previous (scalar) action, this
  wrapper makes sure the environment returns a previous action with shape [1].
  
  This can be necessary when stacking observations with previous actions.
class_docstr_tok: ["Expands","scalar","shapes","in","the","observation",".","For","example",",","if","the","observation","holds","the","previous","(","scalar",")","action",",","this","wrapper","makes","sure","the","environment","returns","a","previous","action","with","shape","[","1","]",".","This","can","be","necessary","when","stacking","observations","with","previous","actions","."]
code: def reset(self) -> dm_env.TimeStep:
      timestep = self._environment.reset()
      expanded_observation = tree.map_structure(
          _expand_scalar_array_shape, timestep.observation
      )
      return timestep._replace(observation=expanded_observation)
  
file_path: acme/acme/wrappers/expand_scalar_observation_shapes.py
imports: from typing import Any
  from acme.wrappers import base
  import dm_env
  from dm_env import specs
  import numpy
  import tree
label_desc: Use image node_id 2 for calling the ExpandScalarObservationShapesWrapper obj's underlying member method code with example usage: obj.reset() and returns: timestep