code: def _prob_kuiper(d, n_eff, dtype="f8"):
      """Test for statistical significance against uniform distribution.
  
      Parameters
      ----------
      d : float
          The kuiper distance value.
      n_eff : int
          The effective number of elements.
      dtype : str | obj
          The data type to be used. Defaults to double precision floats.
  
      Returns
      -------
      pk_norm : float
          The normalized Kuiper value such that 0 < ``pk_norm`` < 1.
  
      References
      ----------
      [1] Stephens MA 1970. Journal of the Royal Statistical Society, ser. B,
      vol 32, pp 115-122.
  
      [2] Kuiper NH 1962. Proceedings of the Koninklijke Nederlands Akademie
      van Wetenschappen, ser Vol 63 pp 38-47
      """
      n_time_slices = np.size(d)  # single value or vector
      n_points = 100
  
      en = math.sqrt(n_eff)
      k_lambda = (en + 0.155 + 0.24 / en) * d  # see [1]
      l2 = k_lambda**2.0
      j2 = (np.arange(n_points) + 1) ** 2
      j2 = j2.repeat(n_time_slices).reshape(n_points, n_time_slices)
      fact = 4.0 * j2 * l2 - 1.0
  
      # compute normalized pK value in range [0,1]
      a = -2.0 * j2 * l2
      b = 2.0 * fact
      pk_norm = -logsumexp(a, b=b, axis=0) / (2.0 * n_eff)
  
      # check for no difference to uniform cdf
      pk_norm = np.where(k_lambda < 0.4, 0.0, pk_norm)
  
      # check for round off errors
      pk_norm = np.where(pk_norm > 1.0, 1.0, pk_norm)
  
      return pk_norm
  
imports: import math
  import numpy
  from scipy.signal import hilbert
  from scipy.special import logsumexp
label_desc: Use image node_id 4 for calling a global function with example usage: _prob_kuiper(d, n_eff, dtype) and returns: pk_norm