from typing import Sequence
from typing import Iterable
from typing import Optional


def get_any_value(
    mapping: dict[str, Sequence[dict]],
    keys: Iterable[str],
) -> Optional[dict]:
    """
    Return any value in `mapping` for any of the `keys`.

    This function will only return a value if it is a non-empty
    sequence. The function will not return the sequence itself, but
    its first member.

    Parameters:

        mapping:
            A mapping from which a value is to be extracted.

        keys:
            The keys which are used to look up values in `mapping`.

    Returns:

        The value of the first key found in `mapping` wll be returned.
        If none of the `keys` are found in `mapping`, ``None`` will be
        returned.

    """

    for key in keys:
        if key in mapping and len(mapping[key]) > 0:
            return mapping[key][0]
    return None