code: def ccf(x, y, adjusted=True, fft=True, *, nlags=None, alpha=None):
      """
      The cross-correlation function.
  
      Parameters
      ----------
      x, y : array_like
          The time series data to use in the calculation.
      adjusted : bool
          If True, then denominators for cross-correlation are n-k, otherwise n.
      fft : bool, default True
          If True, use FFT convolution.  This method should be preferred
          for long time series.
      nlags : int, optional
          Number of lags to return cross-correlations for. If not provided,
          the number of lags equals len(x).
      alpha : float, optional
          If a number is given, the confidence intervals for the given level are
          returned. For instance if alpha=.05, 95 % confidence intervals are
          returned where the standard deviation is computed according to
          1/sqrt(len(x)).
  
      Returns
      -------
      ndarray
          The cross-correlation function of x and y: the element at index k
          is the correlation between {x[k], x[k+1], ..., x[n]} and {y[0], y[1], ..., y[m-k]},
          where n and m are the lengths of x and y, respectively.
      confint : ndarray, optional
          Confidence intervals for the CCF at lags 0, 1, ..., nlags-1 using the level given by
          alpha and the standard deviation calculated as 1/sqrt(len(x)) [1]. Shape (nlags, 2).
          Returned if alpha is not None.
  
      Notes
      -----
      If adjusted is True, the denominator for the cross-correlation is adjusted.
  
      References
      ----------
      .. [1] Brockwell and Davis, 2016. Introduction to Time Series and
         Forecasting, 3rd edition, p. 242.
      """
      x = array_like(x, "x")
      y = array_like(y, "y")
      adjusted = bool_like(adjusted, "adjusted")
      fft = bool_like(fft, "fft", optional=False)
  
      cvf = ccovf(x, y, adjusted=adjusted, demean=True, fft=fft)
      ret = cvf / (np.std(x) * np.std(y))
      ret = ret[:nlags]
  
      if alpha is not None:
          interval = stats.norm.ppf(1.0 - alpha / 2.0) / np.sqrt(len(x))
          confint = ret.reshape(-1, 1) + interval * np.array([-1, 1])
          return ret, confint
      else:
          return ret
  
imports: from __future__ import annotations
  from statsmodels.compat.numpy import lstsq
  from statsmodels.compat.pandas import deprecate_kwarg
  from statsmodels.compat.python import Literal, lzip
  from statsmodels.compat.scipy import _next_regular
  from typing import Union
  import warnings
  import numpy
  from numpy.linalg import LinAlgError
  import pandas
  from scipy import stats
  from scipy.interpolate import interp1d
  from scipy.signal import correlate
  from statsmodels.regression.linear_model import OLS, yule_walker
  from statsmodels.tools.sm_exceptions import CollinearityWarning, InfeasibleTestError, InterpolationWarning, MissingDataError, ValueWarning
  from statsmodels.tools.tools import Bunch, add_constant
  from statsmodels.tools.validation import array_like, bool_like, dict_like, float_like, int_like, string_like
  from statsmodels.tsa._bds import bds
  from statsmodels.tsa._innovations import innovations_algo, innovations_filter
  from statsmodels.tsa.adfvalues import mackinnoncrit, mackinnonp
  from statsmodels.tsa.tsatools import add_trend, lagmat, lagmat2ds
label_desc: Use image node_id 11 for calling a global function with example usage: ccf(x, y, adjusted, fft) and returns: ret,  confint, ret