def column_sort_key(column):
    """Sort key for column names. 'id' and 'uuid' come first, then the
    top-level properties in alphabetical order, followed by the nested
    properties (identifiable by the presence of an underscore)."""
    return ('id', 'uuid', column.name).index(column.name), column.name.count(
        '_'), column.name
