code: def check_sf_logsf(distfn, args, msg):
      # compares sf at several points with the log of the sf
      points = np.array([0.0, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 1.0])
      vals = distfn.ppf(points, *args)
      vals = vals[np.isfinite(vals)]
      sf = distfn.sf(vals, *args)
      logsf = distfn.logsf(vals, *args)
      sf = sf[sf != 0]
      logsf = logsf[np.isfinite(logsf)]
      msg += " - logsf-log(sf) relationship"
      npt.assert_almost_equal(np.log(sf), logsf, decimal=7, err_msg=msg)
  
imports: import sys
  import numpy
  import numpy.testing
  import pytest
  from pytest import raises
  from scipy.integrate import IntegrationWarning
  import itertools
  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_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, check_freezing, check_munp_expect
  from scipy.stats._distr_params import distcont
  from scipy.stats._distn_infrastructure import rv_continuous_frozen
label_desc: Use image node_id 26 for calling a global function with example usage: check_sf_logsf(distfn, args, msg) without return types