If you want to call your class instance like a function, add __call__method to your class. Above is an example of how it works.
__call__