Added main guard, so one can import this module

I added a main guard, so I can import code your module, and use it using python API.