def METHOD_NAME(
    model: Union[DictWrapper, list], path: _Path, new_value: str
) -> None:
    assert len(path) > 0
    if len(path) == 1:
        if isinstance(path[0], int):
            assert isinstance(model, list)
            model[path[0]] = new_value
        else:
            assert isinstance(model, DictWrapper)
            model._inner_dict[path[0]] = new_value
    elif isinstance(path[0], int):
        assert isinstance(model, list)
        return METHOD_NAME(model[path[0]], path[1:], new_value)
    else:
        assert isinstance(model, DictWrapper)
        return METHOD_NAME(model._inner_dict[path[0]], path[1:], new_value)