import re


def canonicalize_string(name):
    """
    Turns any string into a lowercase underscore single word
    - name: string, the table name
    RETURN: string, the name in canonical format
    """
    return "_".join([
        item.lower().strip()
        for item in re.split('\\s+', name.strip())])