def _arma_predict_in_sample(start, end, endog, resid, k_ar, method):
    if 'mle' in method:
        fittedvalues = endog - resid  # get them all then trim
    else:
        fittedvalues = endog[k_ar:] - resid

    fv_start = start
    if 'mle' not in method:
        fv_start -= k_ar  # start is in terms of endog index
    fv_end = min(len(fittedvalues), end + 1)
    return fittedvalues[fv_start:fv_end]
Iterate over a workflow of Components until some condition
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/arima_model.py/_arma_predict_in_sample--crossover with--dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/driver.py/Driver.execute