from operator import getitem


def get_path(event, path):
    """Extract an item at `path` from an event which is usable as a nested
    Python mapping (i.e., using `getitem` for each level in `path`).

    Parameters
    ----------
    event : possibly-nested mapping
    path : iterable of strings

    Returns
    -------
    node
        Whatever lives at the specified `path` (could be a scalar, array,
        another mapping, etc.)

    """
    if isinstance(path, str):
        path = [path]
    node = event
    for subpath in path:
        node = getitem(node, subpath)
    return node