def __set__(self, instance: object, value: Value) -> None:
        """Set the value of the descriptor.

        First calls the validator method if available, then sets the value.

        Args:
            instance: Instance to set the value on
            value: Value to set
        """
        if self.validator_name is not None:
            validator = getattr(instance, self.validator_name)
            value = validator(value)
        instance.__dict__[self.name] = value
Set the value of the descriptor.

        First calls the validator method if available, then sets the value.

        Args:
            instance: Instance to set the value on
            value: Value to set
        
src/anomalib/data/dataclasses/generic.py