<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sort(self, cmp=None, key=None, reverse=False):
 """Overrides sort func to use the KeyValue for the key."""

        if not key and self._keys:
            key = self.KeyValue
        super(CliTable, self).sort(cmp=cmp, key=key, reverse=reverse)