def find_transition(self, gene: Gene, multiplexes: Tuple[Multiplex, ...]) -> Transition:
        """ 
        Find and return a transition in the model for the given gene and multiplexes.
        Raise an AttributeError if there is no multiplex in the graph with the given name.
        """
        multiplexes = tuple(multiplex for multiplex in multiplexes if gene in multiplex.genes)
        for transition in self.transitions:
            if transition.gene == gene and set(transition.multiplexes) == set(multiplexes):
                return transition
        raise AttributeError(f'transition K_{gene.name}' + ''.join(f"+{multiplex!r}" for multiplex in multiplexes) + ' does not exist')
def find_transition ( self , gene : Gene , multiplexes : Tuple [ Multiplex , ... ] ) -> Transition : multiplexes = tuple ( multiplex for multiplex in multiplexes if gene in multiplex . genes ) for transition in self . transitions : if transition . gene == gene and set ( transition . multiplexes ) == set ( multiplexes ) : return transition raise AttributeError ( f'transition K_{gene.name}' + '' . join ( f"+{multiplex!r}" for multiplex in multiplexes ) + ' does not exist' )
Find and return a transition in the model for the given gene and multiplexes.
        Raise an AttributeError if there is no multiplex in the graph with the given name.