code: def _pval_from_bootci(boot, estimate):
      """Compute p-value from bootstrap distribution.
      Similar to the pval function in the R package mediation.
      Note that this is less accurate than a permutation test because the
      bootstrap distribution is not conditioned on a true null hypothesis.
      """
      if estimate == 0:
          out = 1
      else:
          out = 2 * min(sum(boot > 0), sum(boot < 0)) / len(boot)
      return min(out, 1)
  
file_path: pingouin/pingouin/regression.py
imports: import itertools
  import warnings
  import numpy
  import pandas
  import pandas_flavor
  from scipy.stats import t, norm
  from scipy.linalg import pinvh, lstsq
  from pingouin.config import options
  from pingouin.utils import remove_na
  from pingouin.utils import _flatten_list
  from pingouin.utils import _postprocess_dataframe
label_desc: Use image node_id 6 for calling a global function with example usage: _pval_from_bootci(boot, estimate) and returns: min