code: def lpol_fima(d, n=20):
      """MA representation of fractional integration
  
      .. math:: (1-L)^{-d} for |d|<0.5  or |d|<1 (?)
  
      Parameters
      ----------
      d : float
          fractional power
      n : int
          number of terms to calculate, including lag zero
  
      Returns
      -------
      ma : ndarray
          coefficients of lag polynomial
      """
      # hide import inside function until we use this heavily
      from scipy.special import gammaln
  
      j = np.arange(n)
      return np.exp(gammaln(d + j) - gammaln(j + 1) - gammaln(d))
  
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 12 for calling a global function with example usage: lpol_fima(d, n) and returns: np