import re


def normalize_schema(schema):
    """Normalize whitespace in SQL statements returned by SqliteDB[table].schema
    for convenient comparison."""
    return re.sub(r"\s(?=[,)])|(?<=\()\s", "", " ".join(schema.split()))