code: def test_rvs_shape(self, dist_name):
      # Check that when given a size with more dimensions than the
      # dimensions of the broadcast parameters, rvs returns an array
      # with the correct shape.
      dists = {
          "nchypergeom_fisher": nchypergeom_fisher,
          "nchypergeom_wallenius": nchypergeom_wallenius,
      }
      dist = dists[dist_name]
      x = dist.rvs(
          50, 30, [[10], [20]], [0.5, 1.0, 2.0], size=(5, 1, 2, 3)
      )
      assert x.shape == (5, 1, 2, 3)
  
imports: import pytest
  from scipy.stats import betabinom, hypergeom, nhypergeom, bernoulli, boltzmann, skellam, zipf, zipfian, binom, nbinom, nchypergeom_fisher, nchypergeom_wallenius, randint
  import numpy
  from numpy.testing import assert_almost_equal, assert_equal, assert_allclose
  from scipy.special import binom
  import pytest
  from scipy.optimize import root_scalar
  from scipy.integrate import quad
label_desc: Use image node_id 5 for calling the TestNCH obj's underlying member method code with example usage: obj.test_rvs_shape(dist_name) without return types