class_docstr: The Table setting displays a table of values
class_docstr_tok: ["The","Table","setting","displays","a","table","of","values"]
docstr: Sort rows based on values in columns
docstr_tok: ["Sort","rows","based","on","values","in","columns"]
code: def sort_rows(self, columns):
      """Sort rows based on values in columns"""
      indices = [self.column_names.index(c) for c in columns]
  
      def compare_fn(row1, row2):
          for index in indices:
              x = cellprofiler_core.utilities.legacy.cmp(
                  row1[index], row2[index]
              )
              if x != 0:
                  return x
          return 0
  
      self.data.sort(compare_fn)
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/setting/_table.py
imports: import cellprofiler_core.utilities.legacy
  from ._setting import Setting
label_desc: Use image node_id 4 for calling the Table obj's underlying member method code with example usage: obj.sort_rows(columns) and returns: int, x