How to smooth a curve in the right way? How to smooth a curve in the right way? python python