def create_attribute_filter(attribute_name: str, values: list) -> dict:
    """
    Create a categorical attribute filter to be used in a trace filter sequence.

    Args:
        attribute_name:
            A string denoting the name of the attribute.
        values:
            A list of values to be filtered.

    Returns:
        A dictionary containing the filter.
    """
    return {
        'type': 'attributeFilter',
        'attributeName': attribute_name,
        'values': values
    }