def _spec_attachment(name_or_type: str) -> str:
    """
    Returns a query term matching messages that have attachments with a
    certain name or file type.

    Args:
        name_or_type: The specific name of file type to match.

    Returns:
        The query string.

    """

    return f'filename:{name_or_type}'