class_docstr: mixtures with a discrete distribution
  
  The mixing distribution is a discrete distribution like scipy.stats.poisson.
  All distribution in the mixture of the same type and parametrized
  by the outcome of the mixing distribution and have to be a continuous
  distribution (or have a pdf method).
  As an example, a mixture of normal distributed random variables with
  Poisson as the mixing distribution.
  
  
  assumes vectorized shape, loc and scale as in scipy.stats.distributions
  
  assume mixing_dist is frozen
  
  initialization looks fragile for all possible cases of lower and upper
  bounds of the distributions.
code: def rvs(self, size=1):
      mrvs = self.mixing_dist.rvs(size)
      # TODO: check strange cases ? this assumes continous integers
      mrvs_idx = (np.clip(mrvs, self.ma, self.mb) - self.ma).astype(int)
  
      bd_args = tuple(md[mrvs_idx] for md in self.bd_args)
      bd_kwds = {k: self.bd_kwds[k][mrvs_idx] for k in self.bd_kwds}
      kwds = {"size": size}
      kwds.update(bd_kwds)
      rvs = self.base_dist.rvs(*self.bd_args, **kwds)
      return rvs, mrvs_idx
  
file_path: statsmodels/statsmodels/sandbox/distributions/otherdist.py
imports: import numpy
  from scipy import stats
label_desc: Use image node_id 2 for calling the ParametricMixtureD obj's underlying member method code with example usage: obj.rvs(size) and returns: rvs,  mrvs_idx