https://cerwinvegassalee.blogspot.com/2023/12/fitting-piecewise-function-in-python.html
Fitting Piecewise Function In Python