def find_existing_path(dict_: dict, path: list) -> tuple:
    """Return a tuple consisting of:
    - A pointer to any part of the path that already exists in the declared
    dict.
    - The remaining part of the path that needs to be created.
    """
    try:
        subfolder = path.pop(0)
    except IndexError:
        return (dict_, path)

    try:
        dict_ = dict_[subfolder]
        return find_existing_path(dict_, path)
    except KeyError:
        return (dict_, [subfolder] + path)