If there are multiple clauses of an if..elif...else statement, i prefer to put short ones first.  Otherwise it's visaully hard to see that the "if" is followed by an "else".

In this  case, it also puts logic for the top-level of the knowledge map first, which I like.