code: def test_lpol2index_index2lpol():
      process = ArmaProcess([1, 0, 0, -0.8])
      coefs, locs = lpol2index(process.arcoefs)
      assert_almost_equal(coefs, [0.8])
      assert_equal(locs, [2])
  
      process = ArmaProcess([1, 0.1, 0.1, -0.8])
      coefs, locs = lpol2index(process.arcoefs)
      assert_almost_equal(coefs, [-0.1, -0.1, 0.8])
      assert_equal(locs, [0, 1, 2])
      ar = index2lpol(coefs, locs)
      assert_equal(process.arcoefs, ar)
  
imports: from statsmodels.compat.pandas import QUARTER_END
  import datetime
  import numpy
  from numpy.testing import assert_, assert_allclose, assert_almost_equal, assert_array_almost_equal, assert_equal, assert_raises
  import pandas
  import pytest
  from statsmodels.sandbox.tsa.fftarma import ArmaFft
  from statsmodels.tsa.arima.model import ARIMA
  from statsmodels.tsa.arima_process import ArmaProcess, arma_acf, arma_acovf, arma_generate_sample, arma_impulse_response, index2lpol, lpol2index, lpol_fiar, lpol_fima
  from statsmodels.tsa.tests.results import results_arma_acf
  from statsmodels.tsa.tests.results.results_process import armarep
label_desc: Use image node_id 12 for calling a global function with example usage: test_lpol2index_index2lpol() without return types