from typing import Any
from typing import Sequence


def dict_get(d: dict[str, Any], path_seq: Sequence[str]) -> Any:
    """Gets dictionary element of key path.

    Examples:
        >>> config = {"hp": {"batch_size": 32, "lr": 1e-2}}
        >>> dict_get(config, "hp.batch_size".split("."))
        32
    """
    for key in path_seq:
        d = d[key]
    return d