from typing import Any
import re


def query_stripper(query: Any):
    """
    Provide a small helper function that removes whitespace and applies lower-case to a query.

    Helpful for tests where we are matching strings with the same content that might be formatted differently.
    """
    return re.sub(r"\s+", "", str(query)).lower()