code: def check_cdf_ppf(distfn, arg, supp, msg):
      # cdf is a step function, and ppf(q) = min{k : cdf(k) >= q, k integer}
      npt.assert_array_equal(
          distfn.ppf(distfn.cdf(supp, *arg), *arg),
          supp,
          msg + "-roundtrip",
      )
      npt.assert_array_equal(
          distfn.ppf(distfn.cdf(supp, *arg) - 1e-8, *arg),
          supp,
          msg + "-roundtrip",
      )
  
      if not hasattr(distfn, "xk"):
          supp1 = supp[supp < distfn.b]
          npt.assert_array_equal(
              distfn.ppf(distfn.cdf(supp1, *arg) + 1e-8, *arg),
              supp1 + distfn.inc,
              msg + " ppf-cdf-next",
          )
  
file_path: catboost/contrib/python/scipy/py2/scipy/stats/tests/test_discrete_basic.py
imports: from __future__ import division, print_function, absolute_import
  import numpy.testing
  import numpy
  from scipy._lib.six import xrange
  import pytest
  from scipy import stats
  from .common_tests import check_normalization, check_moment, check_mean_expect, check_var_expect, check_skew_expect, check_kurt_expect, check_entropy, check_private_entropy, check_edge_support, check_named_args, check_random_state_property, check_pickling, check_rvs_broadcast
  from scipy.stats._distr_params import distdiscrete
label_desc: Use image node_id 5 for calling a global function with example usage: check_cdf_ppf(distfn, arg, supp, msg) without return types