updating code to handle script conversion better
updating code to handle script conversion better

the code basically leaves out the 
```
if __name__=='__main__':
``` 
block and unwraps any function called main
or-tools/or-tools,or-tools/or-tools,google/or-tools,google/or-tools,or-tools/or-tools,or-tools/or-tools,google/or-tools,google/or-tools,google/or-tools,google/or-tools,or-tools/or-tools,or-tools/or-tools