code: def autocorrelation_plot(series, ax=None, **kwds):
      """Autocorrelation plot for time series.
  
      Parameters:
      -----------
      series: Time series
      ax: Matplotlib axis object, optional
      kwds : keywords
          Options to pass to matplotlib plotting method
  
      Returns:
      -----------
      ax: Matplotlib axis object
      """
      import matplotlib.pyplot as plt
  
      n = len(series)
      data = np.asarray(series)
      if ax is None:
          ax = plt.gca(xlim=(1, n), ylim=(-1.0, 1.0))
      mean = np.mean(data)
      c0 = np.sum((data - mean) ** 2) / float(n)
  
      def r(h):
          return (
              ((data[: n - h] - mean) * (data[h:] - mean)).sum()
              / float(n)
              / c0
          )
  
      x = np.arange(n) + 1
      y = lmap(r, x)
      z95 = 1.959963984540054
      z99 = 2.5758293035489004
      ax.axhline(y=z99 / np.sqrt(n), linestyle="--", color="grey")
      ax.axhline(y=z95 / np.sqrt(n), color="grey")
      ax.axhline(y=0.0, color="black")
      ax.axhline(y=-z95 / np.sqrt(n), color="grey")
      ax.axhline(y=-z99 / np.sqrt(n), linestyle="--", color="grey")
      ax.set_xlabel("Lag")
      ax.set_ylabel("Autocorrelation")
      ax.plot(x, y, **kwds)
      if "label" in kwds:
          ax.legend()
      ax.grid()
      return ax
  
file_path: catboost/contrib/python/pandas/py2/pandas/plotting/_misc.py
imports: from __future__ import division
  import numpy
  from pandas.compat import lmap, lrange, range, zip
  from pandas.util._decorators import deprecate_kwarg
  from pandas.core.dtypes.missing import notna
  from pandas.io.formats.printing import pprint_thing
  from pandas.plotting._style import _get_standard_colors
  from pandas.plotting._tools import _set_ticks_props, _subplots
label_desc: Use image node_id 8 for calling a global function with example usage: autocorrelation_plot(series, ax) and returns: ax, unknown