code: def test_rvs_broadcast(dist, shape_args):
      if dist in ["gausshyper", "studentized_range"]:
          pytest.skip("too slow")
  
      if dist in ["rel_breitwigner"] and _IS_32BIT:
          # gh18414
          pytest.skip("fails on Linux 32-bit")
  
      # If shape_only is True, it means the _rvs method of the
      # distribution uses more than one random number to generate a random
      # variate.  That means the result of using rvs with broadcasting or
      # with a nontrivial size will not necessarily be the same as using the
      # numpy.vectorize'd version of rvs(), so we can only compare the shapes
      # of the results, not the values.
      # Whether or not a distribution is in the following list is an
      # implementation detail of the distribution, not a requirement.  If
      # the implementation the rvs() method of a distribution changes, this
      # test might also have to be changed.
      shape_only = dist in [
          "argus",
          "betaprime",
          "dgamma",
          "dweibull",
          "exponnorm",
          "genhyperbolic",
          "geninvgauss",
          "levy_stable",
          "nct",
          "norminvgauss",
          "rice",
          "skewnorm",
          "semicircular",
          "gennorm",
          "loggamma",
      ]
  
      distfunc = getattr(stats, dist)
      loc = np.zeros(2)
      scale = np.ones((3, 1))
      nargs = distfunc.numargs
      allargs = []
      bshape = [3, 2]
      # Generate shape parameter arguments...
      for k in range(nargs):
          shp = (k + 4,) + (1,) * (k + 2)
          allargs.append(shape_args[k] * np.ones(shp))
          bshape.insert(0, k + 4)
      allargs.extend([loc, scale])
      # bshape holds the expected shape when loc, scale, and the shape
      # parameters are all broadcast together.
  
      check_rvs_broadcast(
          distfunc, dist, allargs, bshape, shape_only, "d"
      )
  
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 7 for calling a global function with example usage: test_rvs_broadcast(dist, shape_args) without return types