code: def impulse_response(self, impulse_length=30):
          
          from scipy.signal import dimpulse
          sys = self.ma_poly, self.ar_poly, 1
          times, psi = dimpulse(sys, n=impulse_length)
          psi = psi[0].flatten()  # Simplify return value into flat array
  
          return psi
docs: Get the impulse response corresponding to our model.
  
          Returns
          -------
          psi : array_like(float)
              psi[j] is the response at lag j of the impulse response.
              We take psi[0] as unity.