async def rank(self, request, origin: Optional[Text])-> Tuple[<EOL>float,<EOL>Optional[BaseTrigger],<EOL>Optional[type],<EOL>Optional[bool],<EOL>]:
if self.origin_name == origin:<EOL><INDENT>score = <NUM_LIT:1.0><EOL><DEDENT>elif self.origin_name is None:<EOL><INDENT>score = settings.JUMPING_TRIGGER_PENALTY<EOL><DEDENT>else:<EOL><INDENT>return <NUM_LIT:0.0>, None, None, None<EOL><DEDENT>trigger = self.factory(request)<EOL>rank = await run_or_return(trigger.rank())<EOL>score *= self.weight * (rank or <NUM_LIT:0.0>)<EOL>return score, trigger, self.dest, self.do_not_register<EOL>
Computes the rank of this transition for a given request.

It returns (in order):

    - The score (from 0 to 1)
    - The trigger instance (if it matched)
    - The class of the destination state (if matched)