code: def two_point_angular(
      ra, dec, bins, method="standard", 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".
      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
      """
      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"
          )
  
      # 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 = np.asarray(ra_dec_to_xyz(ra, dec), order="F").T
      data_R = np.asarray(ra_dec_to_xyz(ra_R, dec_R), order="F").T
  
      # convert spherical bins to cartesian bins
      bins_transform = angular_dist_to_euclidean_dist(bins)
  
      return two_point(
          data,
          bins_transform,
          method=method,
          data_R=data_R,
          random_state=rng,
      )
  
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 6 for calling a global function with example usage: two_point_angular(ra, dec, bins, method, random_state) and returns: two_point