code: def test_methods_with_lists(method, distname, args):
      # Test that the continuous distributions can accept Python lists
      # as arguments.
      dist = getattr(stats, distname)
      f = getattr(dist, method)
      if distname == "invweibull" and method.startswith("log"):
          x = [1.5, 2]
      else:
          x = [0.1, 0.2]
  
      shape2 = [[a] * 2 for a in args]
      loc = [0, 0.1]
      scale = [1, 1.01]
      result = f(x, *shape2, loc=loc, scale=scale)
      npt.assert_allclose(
          result,
          [f(*v) for v in zip(x, *shape2, loc, scale)],
          rtol=1e-14,
          atol=5e-14,
      )
  
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 36 for calling a global function with example usage: test_methods_with_lists(method, distname, args) without return types