code: def _sort_column(self, column, reverse):
          if tk.DISABLED in self.state():
              return
          l = [(self.set(child, column), child) for child in self.get_children('')]
          l.sort(reverse=reverse, key=lambda x: self._column_types[column](x[0]))
          for index, (val, child) in enumerate(l):
              self.move(child, "", index)
          self.heading(column, command=lambda: self._sort_column(column, not reverse))