code: def bootstrap_two_point_angular(
      ra,
      dec,
      bins,
      method="standard",
      Nbootstraps=10,
      random_state=None,
  ):
      """Angular two-point correlation function
  
      A separate function is needed because angular distances are not
      euclidean, and random sampling needs to take into account the
      spherical volume element.
  
      Parameters
      ----------
      ra : array_like
          input right ascention, shape = (n_samples,)
      dec : array_like
          input declination
      bins : array_like
          bins within which to compute the 2-point correlation.
          shape = Nbins + 1
      method : string
          "standard" or "landy-szalay".
      Nbootstraps : int
          number of bootstrap resamples
      random_state : integer, np.random.RandomState, or None
          specify the random state to use for generating background
  
      Returns
      -------
      corr : ndarray
          the estimate of the correlation function within each bin
          shape = Nbins
      dcorr : ndarray
          error estimate on dcorr (sample standard deviation of
          bootstrap resamples)
      bootstraps : ndarray
          The full sample of bootstraps used to compute corr and dcorr
      """
      ra = np.asarray(ra)
      dec = np.asarray(dec)
      rng = check_random_state(random_state)
  
      if method not in ["standard", "landy-szalay"]:
          raise ValueError(
              "method must be 'standard' or 'landy-szalay'"
          )
  
      if bins.ndim != 1:
          raise ValueError("bins must be a 1D array")
  
      if (ra.ndim != 1) or (dec.ndim != 1) or (ra.shape != dec.shape):
          raise ValueError(
              "ra and dec must be 1-dimensional "
              "arrays of the same length"
          )
  
      data = np.asarray(ra_dec_to_xyz(ra, dec), order="F").T
  
      # convert spherical bins to cartesian bins
      bins_transform = angular_dist_to_euclidean_dist(bins)
  
      bootstraps = []
  
      for i in range(Nbootstraps):
          # draw a random sample with N points
          ra_R, dec_R = uniform_sphere(
              (min(ra), max(ra)), (min(dec), max(dec)), 2 * len(ra)
          )
  
          data_R = np.asarray(ra_dec_to_xyz(ra_R, dec_R), order="F").T
  
          if i > 0:
              # random sample of the data
              ind = np.random.randint(0, data.shape[0], data.shape[0])
              data_b = data[ind]
          else:
              data_b = data
  
          bootstraps.append(
              two_point(
                  data_b,
                  bins_transform,
                  method=method,
                  data_R=data_R,
                  random_state=rng,
              )
          )
  
      bootstraps = np.asarray(bootstraps)
      corr = np.mean(bootstraps, 0)
      corr_err = np.std(bootstraps, 0, ddof=1)
  
      return corr, corr_err, bootstraps
  
file_path: astroML/astroML/correlation.py
imports: import numpy
  from sklearn.neighbors import KDTree
  from sklearn.utils import check_random_state
label_desc: Use image node_id 7 for calling a global function with example usage: bootstrap_two_point_angular(ra, dec, bins, method, Nbootstraps, random_state) and returns: corr,  corr_err,  bootstraps