def from_dict(cls, obj: dict) -> CategoricalDistributionPerSet:
        """Create an instance of CategoricalDistributionPerSet from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return CategoricalDistributionPerSet.parse_obj(obj)

        # raise errors for additional fields in the input
        for _key in obj.keys():
            if _key not in cls.__properties:
                raise ValueError("Error due to additional fields (not defined in CategoricalDistributionPerSet) in the input: " + str(obj))

        _obj = CategoricalDistributionPerSet.parse_obj({
            "input": CategoricalDistribution.from_dict(obj.get("input")) if obj.get("input") is not None else None,
            "selected": CategoricalDistribution.from_dict(obj.get("selected")) if obj.get("selected") is not None else None,
            "random": CategoricalDistribution.from_dict(obj.get("random")) if obj.get("random") is not None else None,
            "preselected_datapool": CategoricalDistribution.from_dict(obj.get("preselectedDatapool")) if obj.get("preselectedDatapool") is not None else None,
            "selected_with_datapool": CategoricalDistribution.from_dict(obj.get("selectedWithDatapool")) if obj.get("selectedWithDatapool") is not None else None
        })
        return _obj
Create an instance of CategoricalDistributionPerSet from a dict
lightly/openapi_generated/swagger_client/models/categorical_distribution_per_set.py