@classmethod
def fit(cls, dist, x, *args, **kwargs):
    """
        Creates a ParameterizedDistribution for the given distribution by estimating the distribution parameters from
        the given input data.

        :param dist: the scipy distribution function (e.g. scipy.stat.gamma)
        :param x: the example data to fit parameters on to
        :return: a ParameterizedDistribution
        """
    params = dist.fit(x, *args, **kwargs)
    arg = params[:-2]
    loc = params[-2]
    scale = params[-1]
    return cls.create(dist, (arg, loc, scale))
