def apply_filter(filter_conf: dict, name: str) -> bool:
    """Given a filter configuration, determine if the name should
    be included or excluded.

    Confer the default_filter function for the structure of a
    filter configuration.

    Returns:
        A flag indicating if the table is ok to be included.
    """
    ok = name in filter_conf["items"]
    if filter_conf["type"] == "exclude":
        ok = not ok
    elif filter_conf["type"] != "include":
        raise ValueError
    return ok