Passing A Function As A Parameter Python