Ranked Function In Python Example