def normalize_table_name(name):
    """Check if the table name is obviously invalid."""
    if not isinstance(name, str):
        raise ValueError('Invalid table name: %r' % name)
    name = name.strip()[:63]
    if not len(name):
        raise ValueError('Invalid table name: %r' % name)
    return name
