code: def index2lpol(coeffs, index):
      """
      Expand coefficients to lag poly
  
      Parameters
      ----------
      coeffs : ndarray
          non-zero coefficients of lag polynomial
      index : ndarray
          index (lags) of lag polynomial with non-zero elements
  
      Returns
      -------
      ar : array_like
          coefficients of lag polynomial
      """
      n = max(index)
      ar = np.zeros(n + 1)
      ar[index] = coeffs
      return ar
  
imports: from statsmodels.compat.numpy import NP_LT_2
  from statsmodels.compat.pandas import Appender
  import warnings
  import numpy
  from scipy import linalg, optimize, signal
  from statsmodels.tools.docstring import Docstring, remove_parameters
  from statsmodels.tools.validation import array_like
label_desc: Use image node_id 11 for calling a global function with example usage: index2lpol(coeffs, index) and returns: ar