docstr: Set the mode used to sort this item against others in its column.
  
  ============== ========================================================
  **Sort Modes**
  value          Compares item.value if available; falls back to text
                 comparison.
  text           Compares item.text()
  index          Compares by the order in which items were inserted.
  ============== ========================================================
docstr_tok: ["Set","the","mode","used","to","sort","this","item","against","others","in","its","column",".","==============","========================================================","*","*","Sort","Modes","*","*","value","Compares","item.value","if","available",";","falls","back","to","text","comparison",".","text","Compares","item.text","(",")","index","Compares","by","the","order","in","which","items","were","inserted",".","==============","========================================================"]
code: def setSortMode(self, mode):
      """
      Set the mode used to sort this item against others in its column.
  
      ============== ========================================================
      **Sort Modes**
      value          Compares item.value if available; falls back to text
                     comparison.
      text           Compares item.text()
      index          Compares by the order in which items were inserted.
      ============== ========================================================
      """
      modes = ("value", "text", "index", None)
      if mode not in modes:
          raise ValueError("Sort mode must be one of %s" % str(modes))
      self.sortMode = mode
  
imports: import numpy
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 3 for calling the TableWidgetItem obj's underlying member method code with example usage: obj.setSortMode(mode) without return types