Python Fit Method