How to apply piecewise linear fit in Python? How to apply piecewise linear fit in Python? python python