class_docstr: Environment wrapper for Multigrid environments.
  
  Note: the main difference with vanilla GymWrapper is that reward_spec() is
  overridden and rewards are cast to np.arrays in step()
code: def process_obs(
      self, observation: types.NestedArray
  ) -> types.NestedArray:
      # Convert observations to agent-index-first format
      observation = dict_obs_to_list_obs(observation)
  
      # Assign dtypes to multigrid observations (some of which are lists by
      # default, so do not have a precise dtype that matches their observation
      # spec. This ensures no replay signature mismatch issues occur).
      observation = tree.map_structure(
          lambda x, t: np.asarray(x, dtype=t.dtype),
          observation,
          self.observation_spec(),
      )
      return observation
  
imports: from typing import Any, Dict, List, Optional
  import warnings
  from acme import specs
  from acme import types
  from acme import wrappers
  from acme.multiagent import types
  from acme.wrappers import multiagent_dict_key_wrapper
  import dm_env
  import gym
  from gym import spaces
  import jax
  import numpy
  import tree
label_desc: Use image node_id 2 for calling the MultigridWrapper obj's underlying member method code with example usage: obj.process_obs(observation) and returns: observation