def _overwrite(data: Any, value: Any, nested_keys: list) -> None:
    """Changes ``data`` nested key value to ``value`` using ``nested_keys`` as nested keys list.

    Example:
        >>> x = {'a': [None, {'b': 2}]}
        >>> _overwrite(x, 42, ['a', 1, 'b'])
        >>> x
        {'a': [None, {'b': 42}]}

    """
    key = nested_keys.pop(0)
    if not nested_keys:
        data[key] = value
    else:
        _overwrite(data[key], value, nested_keys)
Changes ``data`` nested key value to ``value`` using ``nested_keys`` as nested keys list.

    Example:
        >>> x = {'a': [None, {'b': 2}]}
        >>> _overwrite(x, 42, ['a', 1, 'b'])
        >>> x
        {'a': [None, {'b': 42}]}

    
deeppavlov/core/commands/utils.py