def METHOD_NAME(y, X, order=2):
    coefs = np.polyfit(X, y, order)
    # Generating weights and model for polynomial function with a given degree
    y_predicted = np.polyval(coefs, X)
    return y_predicted, coefs