Python Model Fit Functional With Weight