def _assert_correct_module_types()

in tools/validator.py [0:0]


  def _assert_correct_module_types(
      self, metadata: Mapping[str, AbstractSet[str]]) -> None:
    if TASK_KEY in metadata:
      allowed_prefixes = ["image-", "text-", "audio-", "video-"]
      for value in metadata[TASK_KEY]:
        if not value.startswith(tuple(allowed_prefixes)):
          raise MarkdownDocumentationError(
              "The 'task' metadata has to start with any of 'image-'"
              f", 'text', 'audio-', 'video-', but is: '{value}'")