code: def bootstrap2(value, distr, args=(), nobs=200, nrep=100):
      """Monte Carlo (or parametric bootstrap) p-values for gof
  
      currently hardcoded for A^2 only
  
      non vectorized, loops over all parametric bootstrap replications and calculates
      and returns specific p-value,
  
      rename function to less generic
  
      """
      # signature similar to kstest ?
      # delegate to fn ?
  
      # rvs_kwds = {'size':(nobs, nrep)}
      # rvs_kwds.update(kwds)
  
      count = 0
      for irep in range(nrep):
          # rvs = distr.rvs(args, **kwds)  #extension to distribution kwds ?
          rvs = distr.rvs(args, **{"size": nobs})
          params = distr.fit_vec(rvs)
          cdfvals = np.sort(distr.cdf(rvs, params))
          stat = asquare(cdfvals, axis=0)
          count += stat >= value
      return count * 1.0 / nrep
  
imports: from statsmodels.compat.python import lmap
  import numpy
  from scipy.stats import distributions
  from statsmodels.tools.decorators import cache_readonly
  from scipy.special import kolmogorov
label_desc: Use image node_id 13 for calling a global function with example usage: bootstrap2(value, distr, args, nobs, nrep) and returns: unknown