code: def _bca_interval(data, statistic, axis, alpha, theta_hat_b, batch):
      """Bias-corrected and accelerated interval."""
      # closely follows [2] "BCa Bootstrap CIs"
      sample = data[0]  # only works with 1 sample statistics right now
  
      # calculate z0_hat
      theta_hat = statistic(sample, axis=axis)[..., None]
      percentile = _percentile_of_score(theta_hat_b, theta_hat, axis=-1)
      z0_hat = ndtri(percentile)
  
      # calculate a_hat
      theta_hat_i = []  # would be better to fill pre-allocated array
      for jackknife_sample in _jackknife_resample(sample, batch):
          theta_hat_i.append(statistic(jackknife_sample, axis=-1))
      theta_hat_i = np.concatenate(theta_hat_i, axis=-1)
      theta_hat_dot = theta_hat_i.mean(axis=-1, keepdims=True)
      num = ((theta_hat_dot - theta_hat_i) ** 3).sum(axis=-1)
      den = 6 * ((theta_hat_dot - theta_hat_i) ** 2).sum(axis=-1) ** (
          3 / 2
      )
      a_hat = num / den
  
      # calculate alpha_1, alpha_2
      z_alpha = ndtri(alpha)
      z_1alpha = -z_alpha
      num1 = z0_hat + z_alpha
      alpha_1 = ndtr(z0_hat + num1 / (1 - a_hat * num1))
      num2 = z0_hat + z_1alpha
      alpha_2 = ndtr(z0_hat + num2 / (1 - a_hat * num2))
      return alpha_1, alpha_2
  
file_path: catboost/contrib/python/scipy/py3/scipy/stats/_bootstrap.py
imports: import numpy
  from scipy._lib._util import check_random_state
  from scipy.special import ndtr, ndtri
  from scipy._lib._util import rng_integers
  from dataclasses import make_dataclass
  from ._common import ConfidenceInterval
  from scipy.stats.stats import _broadcast_concatenate
label_desc: Use image node_id 6 for calling a global function with example usage: _bca_interval(data, statistic, axis, alpha, theta_hat_b, batch) and returns: alpha_1,  alpha_2