def __get__(self, instance: Instance | None, owner: type[Instance]) -> Value | None:
        """Get the value of the descriptor.

        Args:
            instance: Instance the descriptor is accessed from
            owner: Class that owns the descriptor

        Returns:
            Default value if instance is None, otherwise the stored value

        Raises:
            AttributeError: If no default value and field is not optional
        """
        if instance is None:
            if self.default is not None or self.is_optional(owner):
                return self.default
            msg = f"No default attribute value specified for field '{self.name}'."
            raise AttributeError(msg)
        return instance.__dict__[self.name]
Get the value of the descriptor.

        Args:
            instance: Instance the descriptor is accessed from
            owner: Class that owns the descriptor

        Returns:
            Default value if instance is None, otherwise the stored value

        Raises:
            AttributeError: If no default value and field is not optional
        
src/anomalib/data/dataclasses/generic.py