code: def ar2transform(x, arcoefs):
      """
  
      (Greene eq 12-30)
      """
      a1, a2 = arcoefs
      y = np.zeros_like(x)
      y[0] = (
          np.sqrt((1 + a2) * ((1 - a2) ** 2 - a1**2) / (1 - a2))
          * x[0]
      )
      y[1] = (
          np.sqrt(1 - a2**2) * x[2]
          - a1 * np.sqrt(1 - a1**2) / (1 - a2) * x[1]
      )  # TODO:wrong index in x
      y[2:] = x[2:] - a1 * x[1:-1] - a2 * x[:-2]
      return y
  
imports: import math
  import numpy
  from scipy import linalg, stats, special
  from .linalg_decomp_1 import SvdArray
label_desc: Use image node_id 2 for calling a global function with example usage: ar2transform(x, arcoefs) and returns: y