code: def _kolmogni(n, p, q):
      """Computes the PPF/ISF of kolmogn.
  
      n of type integer, n>= 1
      p is the CDF, q the SF, p+q=1
      """
      if np.isnan(n):
          return n  # Keep the same type of nan
      if int(n) != n or n <= 0:
          return np.nan
      if p <= 0:
          return 1.0 / n
      if q <= 0:
          return 1.0
      delta = np.exp((np.log(p) - scipy.special.loggamma(n + 1)) / n)
      if delta <= 1.0 / n:
          return (delta + 1.0 / n) / 2
      x = -np.expm1(np.log(q / 2.0) / n)
      if x >= 1 - 1.0 / n:
          return x
      x1 = scu._kolmogci(p) / np.sqrt(n)
      x1 = min(x1, 1.0 - 1.0 / n)
      _f = lambda x: _kolmogn(n, x) - p
      return scipy.optimize.brentq(_f, 1.0 / n, x1, xtol=1e-14)
  
file_path: catboost/contrib/python/scipy/py3/scipy/stats/_ksstats.py
imports: import numpy
  import scipy.special
  import scipy.special._ufuncs
  import scipy.misc
label_desc: Use image node_id 10 for calling a global function with example usage: _kolmogni(n, p, q) and returns: scipy, n, np, unknown, int, unknown, x