def _prepare_sort_by_scols(self, by: Union[(Name, List[Name])]) -> List[Column]:
    if is_name_like_value(by):
        by = [by]
    else:
        assert is_list_like(by), type(by)
    new_by = []
    for colname in by:
        ser = self[colname]
        if (not isinstance(ser, ps.Series)):
            raise ValueError(('The column %s is not unique. For a multi-index, the label must be a tuple with elements corresponding to each level.' % name_like_string(colname)))
        new_by.append(ser.spark.column)
    return new_by
def _prepare_sort_by_scols(self, by: Union[(Name, List[Name])]) -> List[Column]:
    if is_name_like_value(by):
        by = [by]
    else:
        assert is_list_like(by), type(by)
    new_by = []
    for colname in by:
        ser = self[colname]
        if (not isinstance(ser, ps.Series)):
            raise ValueError(('The column %s is not unique. For a multi-index, the label must be a tuple with elements corresponding to each level.' % name_like_string(colname)))
        new_by.append(ser.spark.column)
    return new_by