def unflatten_dict(d, delimiter = "/"):
  """Creates a hierarchical dictionary by splitting the keys at delimiter."""
  new_dict = {}
  for path, v in d.items():
    current_dict = new_dict
    keys = path.split(delimiter)
    for key in keys[:-1]:
      if key not in current_dict:
        current_dict[key] = {}
      current_dict = current_dict[key]
    current_dict[keys[-1]] = v
  return new_dict