<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_path(target, path, value, separator='/'):
 """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) """

    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