code: def _prepare_data_corr_plot(x, lags, zero):
      zero = bool(zero)
      irregular = False if zero else True
      if lags is None:
          # GH 4663 - use a sensible default value
          nobs = x.shape[0]
          lim = min(int(np.ceil(10 * np.log10(nobs))), nobs // 2)
          lags = np.arange(not zero, lim + 1)
      elif np.isscalar(lags):
          lags = np.arange(not zero, int(lags) + 1)  # +1 for zero lag
      else:
          irregular = True
          lags = np.asanyarray(lags).astype(int)
      nlags = lags.max(0)
  
      return lags, nlags, irregular
  
file_path: statsmodels/statsmodels/graphics/tsaplots.py
imports: from statsmodels.compat.pandas import deprecate_kwarg
  import calendar
  import numpy
  import pandas
  from statsmodels.graphics import utils
  from statsmodels.tools.validation import array_like
  from statsmodels.tsa.stattools import acf, pacf, ccf
label_desc: Use image node_id 1 for calling a global function with example usage: _prepare_data_corr_plot(x, lags, zero) and returns: lags,  nlags,  irregular