import typing


def check_recursive(d: typing.Dict[str, typing.Any], key: str) -> bool:
    """
    Check if undesired metadata is stored in a dictionary of metadata.

    Parameters
    ----------
    d : dict
        A dictionary representing the metadata of the notebook. The dictionary may
        possibly contain other dictionaries.
    key : str
        Name of a undesired metadata, possibly containing a dot to represent nested metadata.

    Returns
    -------
    bool
        Presence of the metadata in the dictionary.
    """
    nested = key.split(".")
    current = d
    for k in nested[:-1]:
        if hasattr(current, "get"):
            current = current.get(k, {})
        else:
            return False
    if not hasattr(current, "pop"):
        return False
    if nested[-1] in current:
        return True
    else:
        return False