import re


def _normalize_keyword(
        query_string,
        findterms=re.compile(r'"([^"]+)"|(\S+)').findall,
        normspace=re.compile(r'\s{2,}').sub
):
    """
    Breaks the string into a list based on spaces and double quotes
    :param query_string: String to be normalized
    :param findterms: Return all non-overlapping matches of regex pattern in string, as a list of strings
    :param normspace: Return the string obtained by replacing the leftmost non-overlapping occurrences of 
                      regex pattern in string by replacement
    :return: Normalized keywords in a list
    """
    return [normspace('', (t[0] or t[1]).strip()) for t in findterms(query_string)]