code: def compute_gamma(n, z, npoints=None, num_trials=1000, fpr=0.05):
      """Compute gamma for confidence interval calculation.
  
      This function simulates an adjusted value of gamma to account for multiplicity
      when forming an 1-fpr level confidence envelope for the ECDF of a sample.
      """
      if npoints is None:
          npoints = n
      gamma = []
      for _ in range(num_trials):
          unif_samples = uniform.rvs(0, 1, n)
          unif_samples = np.sort(unif_samples)
          gamma_m = 1000
          ## Can compute ecdf for all the z together or one at a time.
          f_z = compute_ecdf(unif_samples, z)
          f_z = compute_ecdf(unif_samples, z)
          gamma_m = 2 * min(
              np.amin(binom.cdf(n * f_z, n, z)),
              np.amin(1 - binom.cdf(n * f_z - 1, n, z)),
          )
          gamma.append(gamma_m)
      return np.quantile(gamma, fpr)
  
file_path: arviz/arviz/plots/ecdfplot.py
imports: import numpy
  from scipy.stats import uniform, binom
  from ..rcparams import rcParams
  from .plot_utils import get_plotting_function
label_desc: Use image node_id 4 for calling a global function with example usage: compute_gamma(n, z, npoints, num_trials, fpr) and returns: np