def getPossibleNextTemplates(self, next_possible_states):
        """ Get matching template and fields of message
        for next possible states.
        """
        ret = []
        # Set matching template and its fields as current template
        for state in next_possible_states:
            try:
                id_list = self.state_id[state[0]]
            except KeyError:
                continue
            for id in id_list:
                template = self.template_dic[id]
                ret.append(template)
        ret.sort(key=lambda t: t.count, reverse=True)
        return [(t.display(), t.count) % "%s (%d)" for t in ret]
dataset/ETHPy150Open hgascon/pulsar/pulsar/core/lens.py/TemplateList.getPossibleNextTemplates/swapped operands of `%`