def get_filename_suffix(filename, suffixes):
    """Ensure that the given file has a suffix that is in the given set of
    allowed suffixes. Returns the matched suffix or None.

    Parameters
    ----------
    filename : string
        Name of file
    suffixes : Iterable(string)

    Returns
    -------
    string
        Matched suffix from list of suffixes or None.
    """
    for s in suffixes:
        if filename.endswith(s):
            return s
