code: def sorted_conkeys(self, prefix=None):
          conkeys = []
          for cond in _COND_PREFIXES:
              conkeys += sorted([key for key in self.conditions
                                 if key.startswith(cond)], key=self.cond_int)
          if not prefix:
              return conkeys
          return [key for key in conkeys if key.startswith(prefix)]