Step 3.
else : NEW_LINE INDENT if root . right is None : NEW_LINE INDENT return - 1 NEW_LINE DEDENT else : NEW_LINE INDENT rightSize = getRank ( root . right , x ) NEW_LINE if rightSize == - 1 : NEW_LINE INDENT return - 1 NEW_LINE DEDENT else : NEW_LINE INDENT return root . leftSize + 1 + rightSize NEW_LINE DEDENT DEDENT DEDENT