def raise_for_undefined_annotation(self, line: str, position: int, annotation: str) -> None:
        """Raise an exception if the annotation is not defined.

        :raises: UndefinedAnnotationWarning
        """
        if self._in_debug_mode:
            return

        if not self.has_annotation(annotation):
            raise UndefinedAnnotationWarning(self.get_line_number(), line, position, annotation)
Raise an exception if the annotation is not defined.

        :raises: UndefinedAnnotationWarning