code: def unflatten_dict(
      dt: Dict[str, T], delimiter: str = "/"
  ) -> Dict[str, T]:
      """Unflatten dict. Does not support unflattening lists."""
      dict_type = type(dt)
      out = dict_type()
      for key, val in dt.items():
          path = key.split(delimiter)
          item = out
          for k in path[:-1]:
              item = item.setdefault(k, dict_type())
              if not isinstance(item, dict_type):
                  raise TypeError(
                      f"Cannot unflatten dict due the key '{key}' "
                      f"having a parent key '{k}', which value is not "
                      f"of type {dict_type} (got {type(item)}). "
                      "Change the key names to resolve the conflict."
                  )
          item[path[-1]] = val
      return out
  
file_path: ray/python/ray/_private/dict.py
imports: import copy
  from collections import deque
  from collections.abc import Mapping, Sequence
  from typing import Dict, List, Optional, TypeVar, Union
  from ray.util.annotations import Deprecated
label_desc: Use image node_id 4 for calling a global function with example usage: unflatten_dict(dt, delimiter) and returns: out