code: def unstack_numpy_list_dict(
      list_dict: Dict[str, np.ndarray]
  ) -> List[Dict[str, np.ndarray]]:
      """Inverse of :func:`~maze.train.utils.train_utils.stack_numpy_dict_list`.
  
      Converts a dict of stacked lists (e.g. {a : [1, 2]}) into a list of dicts (e.g. [{a: 1}, {a: 2}]).
  
      :param list_dict: Dict of stacked lists, e.g. {a : [1, 2]}
      :return: List of dicts, e.g. [{a: 1}, {a: 2}]
      """
      keys = list(list_dict.keys())
      if list_dict[keys[0]].shape == ():
          # We already have flat values
          return [list_dict]
  
      n_items = len(list_dict[keys[0]])
      dict_list = []
  
      for i in range(n_items):
          action_dict = dict()
          for k in keys:
              action_dict[k] = list_dict[k][i]
          dict_list.append(action_dict)
  
      return dict_list
  
file_path: maze/maze/train/utils/train_utils.py
imports: from collections import defaultdict
  from typing import List, Dict, Iterable, Union
  import numpy
  import torch
  from maze.core.env.structured_env import ActorID
label_desc: Use image node_id 2 for calling a global function with example usage: unstack_numpy_list_dict(list_dict) and returns: dict_list, list