code: def _validate_supported_languages(
      language: Optional[Text], node: SchemaNode
  ) -> None:
      supported_languages = node.uses.supported_languages()
      not_supported_languages = node.uses.not_supported_languages()
  
      if supported_languages and not_supported_languages:
          raise RasaException(
              "Only one of `supported_languages` and "
              "`not_supported_languages` can return a value different from `None`."
          )
  
      if (
          language
          and supported_languages is not None
          and language not in supported_languages
      ):
          raise GraphSchemaValidationException(
              f"The component '{node.uses.__name__}' does not support the currently "
              f"specified language '{language}'."
          )
  
      if (
          language
          and not_supported_languages is not None
          and language in not_supported_languages
      ):
          raise GraphSchemaValidationException(
              f"The component '{node.uses.__name__}' does not support the currently "
              f"specified language '{language}'."
          )
  
imports: import inspect
  import logging
  import typing
  from typing import Optional, Callable, Text, Tuple, Dict, Type, Any, Set, Union, TypeVar, List
  import dataclasses
  from rasa.core.policies.policy import PolicyPrediction
  from rasa.engine.training.fingerprinting import Fingerprintable
  import rasa.utils.common
  import typing_utils
  from rasa.engine.exceptions import GraphSchemaValidationException
  from rasa.engine.graph import GraphSchema, GraphComponent, SchemaNode, ExecutionContext, GraphModelConfiguration
  from rasa.engine.constants import RESERVED_PLACEHOLDERS
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.shared.constants import DOCS_URL_GRAPH_COMPONENTS
  from rasa.shared.exceptions import RasaException
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 9 for calling a global function with example usage: _validate_supported_languages(language, node) without return types