code: def acf(x, lag, adjust):
      """
      generate acf score as in statsmodels.tsa.stattools.acf
      code adapted from https://stackoverflow.com/questions/36038927/
      """
      length = x.size
      y1, y2 = x[: (length - lag)], x[lag:]
      sum_product = np.sum((y1 - np.mean(x)) * (y2 - np.mean(x)))
      if adjust:
          var = np.var(x)
          if var == 0:
              return 0
          return sum_product / ((length - lag) * var)
      else:
          return sum_product
  
imports: from scipy.fftpack import fft, fftfreq
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: acf(x, lag, adjust) and returns: unknown, sum_product, int