def transition_exists(self, previousTemplates, nextTemplate):
        """ Check if there is a valid transition for
        the sequence of templates.
        """
        transition = self.generateTransitionLabel(previousTemplates,
                                                  nextTemplate)
        return transition in self.rules
dataset/ETHPy150Open hgascon/pulsar/pulsar/core/lens.py/RuleList.transition_exists/original