def _exact_phrase(phrase: str) -> str:
    """
    Returns a query term matching messages that have an exact phrase.

    Args:
        phrase: The exact phrase to match.

    Returns:
        The query string.

    """

    return f'"{phrase}"'