How To Make Callback Function In Python