code: def armaloop(arcoefs, macoefs, x):
      """get arma recursion in simple loop
  
      for simplicity assumes that ma polynomial is not longer than the ar-polynomial
  
      Parameters
      ----------
      arcoefs : array_like
          autoregressive coefficients in right hand side parameterization
      macoefs : array_like
          moving average coefficients, without leading 1
  
      Returns
      -------
      y : ndarray
          predicted values, initial values are the same as the observed values
      e : ndarray
          predicted residuals, zero for initial observations
  
      Notes
      -----
      Except for the treatment of initial observations this is the same as using
      scipy.signal.lfilter, which is much faster. Written for testing only
      """
      arcoefs_r = np.asarray(arcoefs)
      macoefs_r = np.asarray(macoefs)
      x = np.asarray(x)
      nobs = x.shape[0]
      # assume ar longer than ma
      arlag = arcoefs_r.shape[0]
      malag = macoefs_r.shape[0]
      maxlag = max(arlag, malag)
      print(maxlag)
      y = np.zeros(x.shape, float)
      e = np.zeros(x.shape, float)
      y[:maxlag] = x[:maxlag]
  
      # if malag > arlaga:
      for t in range(arlag, maxlag):
          y[t] = (x[t - arlag : t] * arcoefs_r).sum(0) + (
              e[:t] * macoefs_r[:t]
          ).sum(0)
          e[t] = x[t] - y[t]
  
      for t in range(maxlag, nobs):
          # wrong broadcasting, 1d only
          y[t] = (x[t - arlag : t] * arcoefs_r).sum(0) + (
              e[t - malag : t] * macoefs_r
          ).sum(0)
          e[t] = x[t] - y[t]
  
      return y, e
  
label_desc: Use image node_id 1 for calling a global function with example usage: armaloop(arcoefs, macoefs, x) and returns: y,  e