from typing import Union
from typing import Mapping
from typing import Sequence


def recursive_contains(
    obj: Union[Mapping, Sequence], *, keys: Sequence
) -> bool:
    """Checks whether the given keysequence is reachable in the ``obj``.

    Args:
        obj (Union[Mapping, Sequence]): The object to check recursively
        keys (Sequence): The sequence of keys to check for

    Returns:
        bool: Whether the key sequence is reachable
    """
    if len(keys) > 1:
        # Check and continue recursion
        if keys[0] in obj:
            return recursive_contains(obj[keys[0]], keys=keys[1:])
        # else: not available
        return False
    # else: reached the end of the recursion
    return keys[0] in obj