def whitelisted(data, whitelist):
    """Remove all non-whitelisted keys from input dictionary
    `data`.

    Keys are specified as a list of strings; where each string
    defines the dotted-path to an attribute.

    Args:
        data (dict): the dictionary to be cleaned.
        whitelisted: a list containing the whitelisted keys.

    Returns:
        dict: the whitelisted keys from the dictionary.
    """
    return data
