code: def _bias_corrected_ci(bootdist, sample_point, alpha=0.05):
      """Bias-corrected confidence intervals
  
      Parameters
      ----------
      bootdist : array-like
          Array with bootstrap estimates for each sample.
      sample_point : float
          Point estimate based on full sample.
      alpha : float
          Alpha for confidence interval.
  
      Returns
      -------
      CI : 1d array-like
          Lower and upper bias-corrected confidence interval estimates.
  
      Notes
      -----
      This is what's used in the "cper" method implemented in :py:func:`pingouin.compute_bootci`.
  
      This differs from the bias-corrected and accelerated method (BCa, default in Matlab and
      SciPy) because it does not correct for skewness. Indeed, the acceleration parameter, a,
      is proportional to the skewness of the bootstrap distribution. The bias-correction parameter,
      z0, is related to the proportion of bootstrap estimates that are less than the observed
      statistic.
      """
      # Bias of bootstrap estimates
      # In Matlab bootci they also count when bootdist == sample_point
      # >>> z0 = norminv(mean(bstat < stat,1) + mean(bstat == stat,1)/2);
      z0 = norm.ppf(np.mean(bootdist < sample_point))
      # Adjusted intervals
      adjusted_ll = norm.cdf(2 * z0 + norm.ppf(alpha / 2)) * 100
      adjusted_ul = norm.cdf(2 * z0 + norm.ppf(1 - alpha / 2)) * 100
      # Adjusted percentiles
      ci = np.percentile(bootdist, q=[adjusted_ll, adjusted_ul])
      return ci
  
file_path: pingouin/pingouin/regression.py
imports: import itertools
  import warnings
  import numpy
  import pandas
  import pandas_flavor
  from scipy.stats import t, norm
  from scipy.linalg import pinvh, lstsq
  from pingouin.config import options
  from pingouin.utils import remove_na
  from pingouin.utils import _flatten_list
  from pingouin.utils import _postprocess_dataframe
label_desc: Use image node_id 5 for calling a global function with example usage: _bias_corrected_ci(bootdist, sample_point, alpha) and returns: ci