Return the trailing number from cond if any, as an int. If no
        trailing number, return the string conkey as is.

        This is used for sorting the conditions properly even when
        passing the number 10. The name of this function could be
        improved since it might return a string.

def cond_int(self, conkey):
        """Return the trailing number from cond if any, as an int. If no
        trailing number, return the string conkey as is.

        This is used for sorting the conditions properly even when
        passing the number 10. The name of this function could be
        improved since it might return a string."""

        m = re.match(self.numrx, conkey)
        if not m:
            return conkey
        return int(m.group(1))