code: def _plotly_viz_plot_autocorrelation(
      data,
      white_noise,
      n_lags,
      plot_type="acf",
      title="Autocorrelation Plot",
  ):
      """Create timeseries autocorrelation visualization.
  
      Args:
          data: numpy.ndarray containing the correlations
          white_noise: Significance threshold
          n_lags: The number of lags to plot.
          plot_type: Choose between 'acf' or 'pacf. Defaults to "pacf".
          title: Title of the plot. Defaults to "Autocorrelation Plot".
  
      Raises:
          ValueError: Invalid `plot_type`.
  
      Returns:
          The visualization
      """
      if plot_type == "acf":
          data = [go.Bar(y=data, showlegend=False, name=plot_type)]
      elif plot_type == "pacf":
          data = [go.Bar(y=data, showlegend=False, name=plot_type)]
      else:
          raise ValueError("Unsupported input data type")
  
      fig = go.Figure(
          data=data, layout=figure_layout(title, "Lags", plot_type)
      )
      fig.add_trace(
          go.Scatter(
              x=[i for i in range(n_lags + 1)],
              y=[white_noise for i in range(n_lags + 1)],
              mode="lines",
              name="95% Confidence",
              line={"dash": "dash"},
          )
      )
  
      fig.add_trace(
          go.Scatter(
              x=[i for i in range(n_lags + 1)],
              y=[-white_noise for i in range(n_lags + 1)],
              mode="lines",
              line={"dash": "dash", "color": "red"},
              showlegend=False,
          )
      )
      return fig
  
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 11 for calling a global function with example usage: _plotly_viz_plot_autocorrelation(data, white_noise, n_lags, plot_type, title) and returns: fig