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

        if not isinstance(obj, dict):
            return DatasetSizes.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 DatasetSizes) in the input: " + str(obj))

        _obj = DatasetSizes.parse_obj({
            "n_input": obj.get("nInput"),
            "n_corrupt": obj.get("nCorrupt"),
            "n_duplicate": obj.get("nDuplicate"),
            "n_removed": obj.get("nRemoved"),
            "n_selected": obj.get("nSelected"),
            "n_preselected_datapool": obj.get("nPreselectedDatapool"),
            "n_selected_with_datapool": obj.get("nSelectedWithDatapool")
        })
        return _obj
Create an instance of DatasetSizes from a dict
lightly/openapi_generated/swagger_client/models/dataset_sizes.py