human
I wrote the below code

    def msear_err(arma, ar_des):
        (ar, ma) = (np.r_[(1, arma[:(p - 1)])], np.r_[(1, arma[(p - 1):])])
        ar_approx = arma_impulse_response(ma, ar, n)
        return (ar_des - ar_approx)
    if (start is None):
        arma0 = np.r_[(((-0.9) * np.ones((p - 1))), np.zeros((q - 1)))]
    else:
        arma0 = start
    res = optimize.leastsq(msear_err, arma0, ar_des, maxfev=5000)
    arma_app = np.atleast_1d(res[0])
    ar_app = (np.r_[(1, arma_app[:(p - 1)])],)
    ma_app = np.r_[(1, arma_app[(p - 1):])]
    return (ar_app, ma_app, res)

What's a good function header?
assistant
#Here's a good function header.

def ar2arma(ar_des, p, q, n=20, mse='ar', start=None):