What is the equivalent of a javascript callable function as a class parameter in python