code: def _compute_hommel_value(z_vals, alpha, verbose=False):
      """Compute the All-Resolution Inference hommel-value."""
      if alpha < 0 or alpha > 1:
          raise ValueError("alpha should be between 0 and 1")
      z_vals_ = -np.sort(-z_vals)
      p_vals = norm.sf(z_vals_)
      n_samples = len(p_vals)
  
      if len(p_vals) == 1:
          return p_vals[0] > alpha
      if p_vals[0] > alpha:
          return n_samples
      if p_vals[-1] < alpha:
          return 0
      slopes = (alpha - p_vals[:-1]) / np.arange(n_samples - 1, 0, -1)
      slope = np.max(slopes)
      hommel_value = np.trunc(alpha / slope)
      if verbose:
          try:
              from matplotlib import pyplot as plt
          except ImportError:
              warnings.warn(
                  '"verbose" option requires the package Matplotlib.'
                  "Please install it using `pip install matplotlib`."
              )
          else:
              plt.figure()
              plt.plot(np.arange(1, 1 + n_samples), p_vals, "o")
              plt.plot(
                  [n_samples - hommel_value, n_samples], [0, alpha]
              )
              plt.plot([0, n_samples], [0, 0], "k")
              plt.show(block=False)
      return int(np.minimum(hommel_value, n_samples))
  
file_path: nilearn/nilearn/glm/thresholding.py
imports: import warnings
  import numpy
  from scipy.ndimage import label
  from scipy.stats import norm
  from nilearn.image import get_data, math_img, threshold_img
  from nilearn.maskers import NiftiMasker
label_desc: Use image node_id 1 for calling a global function with example usage: _compute_hommel_value(z_vals, alpha, verbose) and returns: int, unknown, n_samples, int