code: def fdr_threshold(p_values, alpha=0.05):
      """Return FDR threshold given p values
  
      Parameters
      -----------
      p_values : array of shape (n), optional
          The samples p-value
      alpha : float, optional
          The desired FDR significance
  
      Returns
      -------
      critical_p_value: float
          The p value corresponding to the FDR alpha
      """
      p_values = check_p_values(p_values)
      n_samples = np.size(p_values)
      p_corr = alpha / n_samples
      sp_values = np.sort(p_values)
      critical_set = sp_values[
          sp_values < p_corr * np.arange(1, n_samples + 1)
      ]
      if len(critical_set) > 0:
          critical_p_value = critical_set.max()
      else:
          critical_p_value = p_corr
      return critical_p_value
  
file_path: nipy/nipy/algorithms/statistics/empirical_pvalue.py
imports: import numpy
  import scipy.stats
  from numpy.linalg import pinv
label_desc: Use image node_id 4 for calling a global function with example usage: fdr_threshold(p_values, alpha) and returns: critical_p_value