def sanitize_string(query):
    """Clean up user input

    Remove unwanted characters from strings and convert uppercase caharacters
    before search: for better scores on Levenshtein distances.

    Args:
        query(string): the user's search strings.

    Returns:
        string: A sanitized string.
    """
    # 1st pass we remove non alphanumeric characters (emojis, slashes, etc.)
    first_pass = ''.join(c for c in query if c.isalnum() or c == ' ')
    # 2nd pass we remove multiple spaces for better fuzzy matching score
    second_pass = ' '.join(first_pass.split())
    # 3rd pass we convert to lowercase for better fuzzy matching score
    third_pass = second_pass.lower()
    return third_pass