code: def _pandas_compute_autocorrelation(
      timeseries,
      n_lags: Optional[int] = 40,
      plot_type: str = "acf",
      fft: bool = False,
      **kwargs,
  ):
      """Correlation estimate using partial autocorrelation or autocorrelation.
  
      Args:
          timeseries: Series object containing datetime index
          n_lags: Number of lags to return autocorrelation for. Defaults to 40.
          plot_type: Choose between 'acf' or 'pacf. Defaults to "acf".
          fft: If True, computes ACF via fourier fast transform (FFT). Defaults to False.
          **kwargs: Keyword arguments
  
      Raises:
          ValueError: Invalid `plot_type`.
  
      Returns:
          numpy.ndarray containing the correlations
      """
      if plot_type == "pacf":
          data = _compat["statsmodels.tsa.stattools"].pacf(timeseries, n_lags, **kwargs)  # type: ignore
      elif plot_type == "acf":
          data = _compat["statsmodels.tsa.stattools"].acf(  # type: ignore
              timeseries, n_lags, fft=fft, **kwargs
          )
      else:
          raise ValueError("Unsupported input data type")
      white_noise = 1.96 / np.sqrt(len(data))
      return data, white_noise
  
imports: import warnings
  from typing import Optional
  import matplotlib.pyplot
  import seaborn
  import pandas
  import numpy
  import plotly.graph_objs
  from plotly.subplots import make_subplots
  from plotly.offline import init_notebook_mode, iplot
  from data_describe.config._config import get_option
  from data_describe.backends import _get_viz_backend, _get_compute_backend
  from data_describe.compat import _is_dataframe, _compat, _requires, _in_notebook
label_desc: Use image node_id 8 for calling a global function with example usage: _pandas_compute_autocorrelation(timeseries, n_lags, plot_type, fft) and returns: data,  white_noise