code: def _dcorr(y, n2, A, dcov2_xx):
      
      # Pairwise Euclidean distances
      b = squareform(pdist(y, metric='euclidean'))
      # Double centering
      B = b - b.mean(axis=0)[None, :] - b.mean(axis=1)[:, None] + b.mean()
      # Compute squared distance covariances
      dcov2_yy = np.vdot(B, B) / n2
      dcov2_xy = np.vdot(A, B) / n2
      return np.sqrt(dcov2_xy) / np.sqrt(np.sqrt(dcov2_xx) * np.sqrt(dcov2_yy))
docs: Helper function for distance correlation bootstrapping.