Best Practices For Python Code Optimization In Compiler