docs: def raise_for_invalid_annotation_value(self, line: str, position: int, key: str, value: str) -> None:
          """Raise an exception if the annotation is not defined.
  
          :raises: IllegalAnnotationValueWarning or MissingAnnotationRegexWarning
          """
          if self._in_debug_mode:
              return
  
          if self.has_enumerated_annotation(key) and value not in self.annotation_to_term[key]:
              raise IllegalAnnotationValueWarning(self.get_line_number(), line, position, key, value)
  
          elif self.has_regex_annotation(key) and not self.annotation_to_pattern[key].match(value):
              raise MissingAnnotationRegexWarning(self.get_line_number(), line, position, key, value)
  
          elif self.has_local_annotation(key) and value not in self.annotation_to_local[key]:  # TODO condense
              raise IllegalAnnotationValueWarning(self.get_line_number(), line, position, key, value)