Condition For Invertible Function Example In Python