def require_keys(keys, dikt):
    """Verifies that keys appear in the specified dictionary.

    Parameters
    ----------
    keys : list of str
        List of required keys.

    dikt : dict
        The dictionary that is checked for keys.

    Returns
    -------
    None

    Raises
    ------
    Exception
        Raised when a required key is not present.

    """
    dikt_keys = set(dikt)
    for key in keys:
        if key not in dikt_keys:
            msg = "'%s' is required." % (key,)
            raise Exception(msg)
