def _make_random_variable(distribution_cls):
@interceptable<EOL>@functools.wraps(distribution_cls, assigned=('<STR_LIT>', '<STR_LIT>'))<EOL>@docstring_util.expand_docstring(<EOL>cls=distribution_cls.__name__,<EOL>doc=inspect.cleandoc(distribution_cls.__init__.__doc__ or '<STR_LIT>'))<EOL>def func(*args, **kwargs):<EOL><INDENT>"""<STR_LIT>"""<EOL>sample_shape = kwargs.pop('<STR_LIT>', ())<EOL>value = kwargs.pop('<STR_LIT:value>', None)<EOL>return RandomVariable(distribution=distribution_cls(*args, **kwargs),<EOL>sample_shape=sample_shape,<EOL>value=value)<EOL><DEDENT>return func<EOL>
Factory function to make random variable given distribution class.