code: def check_rvs_broadcast(
      distfunc, distname, allargs, shape, shape_only, otype
  ):
      np.random.seed(123)
      with suppress_warnings() as sup:
          # frechet_l and frechet_r are deprecated, so all their
          # methods generate DeprecationWarnings.
          sup.filter(category=DeprecationWarning, message=".*frechet_")
          sample = distfunc.rvs(*allargs)
          assert_equal(
              sample.shape,
              shape,
              "%s: rvs failed to broadcast" % distname,
          )
          if not shape_only:
              rvs = np.vectorize(
                  lambda *allargs: distfunc.rvs(*allargs), otypes=otype
              )
              np.random.seed(123)
              expected = rvs(*allargs)
              assert_allclose(sample, expected, rtol=1e-15)
  
imports: from __future__ import division, print_function, absolute_import
  import pickle
  import numpy
  import numpy.testing
  from numpy.testing import assert_allclose, assert_equal
  from scipy._lib._numpy_compat import suppress_warnings
  from pytest import raises
  import numpy.ma.testutils
  from scipy._lib._util import getargspec_no_self
  from scipy import stats
label_desc: Use image node_id 18 for calling a global function with example usage: check_rvs_broadcast(distfunc, distname, allargs, shape, shape_only, otype) without return types