code: def test_cont_basic(distname, arg):
      # this test skips slow distributions
  
      if distname == "truncnorm":
          pytest.xfail(reason=distname)
  
      try:
          distfn = getattr(stats, distname)
      except TypeError:
          distfn = distname
          distname = "rv_histogram_instance"
      np.random.seed(765456)
      sn = 500
      with suppress_warnings() as sup:
          # frechet_l and frechet_r are deprecated, so all their
          # methods generate DeprecationWarnings.
          sup.filter(category=DeprecationWarning, message=".*frechet_")
          rvs = distfn.rvs(size=sn, *arg)
          sm = rvs.mean()
          sv = rvs.var()
          m, v = distfn.stats(*arg)
  
          check_sample_meanvar_(
              distfn,
              arg,
              m,
              v,
              sm,
              sv,
              sn,
              distname + "sample mean test",
          )
          check_cdf_ppf(distfn, arg, distname)
          check_sf_isf(distfn, arg, distname)
          check_pdf(distfn, arg, distname)
          check_pdf_logpdf(distfn, arg, distname)
          check_cdf_logcdf(distfn, arg, distname)
          check_sf_logsf(distfn, arg, distname)
  
          alpha = 0.01
          if distname == "rv_histogram_instance":
              check_distribution_rvs(distfn.cdf, arg, alpha, rvs)
          else:
              check_distribution_rvs(distname, arg, alpha, rvs)
  
          locscale_defaults = (0, 1)
          meths = [
              distfn.pdf,
              distfn.logpdf,
              distfn.cdf,
              distfn.logcdf,
              distfn.logsf,
          ]
          # make sure arguments are within support
          spec_x = {
              "frechet_l": -0.5,
              "weibull_max": -0.5,
              "levy_l": -0.5,
              "pareto": 1.5,
              "tukeylambda": 0.3,
              "rv_histogram_instance": 5.0,
          }
          x = spec_x.get(distname, 0.5)
          if distname == "invweibull":
              arg = (1,)
          elif distname == "ksone":
              arg = (3,)
          check_named_args(distfn, x, arg, locscale_defaults, meths)
          check_random_state_property(distfn, arg)
          check_pickling(distfn, arg)
  
          # Entropy
          if distname not in [
              "ksone",
              "kstwobign",
              "ncf",
              "crystalball",
          ]:
              check_entropy(distfn, arg, distname)
  
          if distfn.numargs == 0:
              check_vecentropy(distfn, arg)
  
          if (
              distfn.__class__._entropy != stats.rv_continuous._entropy
              and distname != "vonmises"
          ):
              check_private_entropy(distfn, arg, stats.rv_continuous)
  
          with suppress_warnings() as sup:
              sup.filter(
                  IntegrationWarning, "The occurrence of roundoff error"
              )
              sup.filter(IntegrationWarning, "Extremely bad integrand")
              sup.filter(RuntimeWarning, "invalid value")
              check_entropy_vect_scale(distfn, arg)
  
          check_edge_support(distfn, arg)
  
          check_meth_dtype(distfn, arg, meths)
          check_ppf_dtype(distfn, arg)
  
          if distname not in fails_cmplx:
              check_cmplx_deriv(distfn, arg)
  
          if distname != "truncnorm":
              check_ppf_private(distfn, arg, distname)
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  import numpy.testing
  import pytest
  from pytest import raises
  from scipy._lib._numpy_compat import suppress_warnings
  from scipy.integrate import IntegrationWarning
  from scipy import stats
  from scipy.special import betainc
  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_entropy_vect_scale, check_edge_support, check_named_args, check_random_state_property, check_meth_dtype, check_ppf_dtype, check_cmplx_deriv, check_pickling, check_rvs_broadcast
  from scipy.stats._distr_params import distcont
label_desc: Use image node_id 2 for calling a global function with example usage: test_cont_basic(distname, arg) without return types