def whitelist(dct, fields):
    """
    Leave only those fields which keys are present in `fields`.

    :param dct: Source dictionary
    :type dct: dict
    :param fields: List of fields to keep
    :type fields: list
    :return: Resulting dictionary containing whitelisted fields only
    :rtype: dict
    """
    return {
        k: v for k, v in dct.items() if k in fields
    }