adding a sample code that can call a python function from multiple threads