from functools import reduce
import operator


def get_dict_value_from_path(dict_: dict, path: list[str]):
    """Gets a nested dictionary value using an array of keys representing the path
    to the value.
    """

    if path is None:
        return None
    try:
        return reduce(operator.getitem, path, dict_)
    except (KeyError, TypeError):
        return None