@classmethod
def from_dictionary(cls, dictionary: dict) ->'RV':
    """
        Construct random variable from dictionary.

        Parameters
        ----------

        dictionary: dict
            A dictionary with the keys

               * "name" (mandatory)
               * "args" (optional)
               * "kwargs" (optional)

            as in scipy.stats.



        .. note::

            Either the "args" or the "kwargs" key has to be present.
        """
    return cls(dictionary['type'], *dictionary.get('args', []), **
        dictionary.get('kwargs', {}))
