code: def write_path(target, path, value, separator='/'):
      
      parts = path.split(separator)
      current = target
      for part in parts[:-1]:
          if part not in current:
              current[part] = current = {}
          else:
              current = current[part]
      current[parts[-1]] = value
docs: Write a value deep into a dict building any intermediate keys.
  
      :param target: a dict to write data to
      :param path: a key or path to a key (path is delimited by `separator`)
      :param value: the value to write to the key
      :keyword separator: the separator used in the path (ex. Could be "." for a
          json/mongodb type of value)