Best Practices For Python Code Optimization Diagram