code: def _validate_parent_return_type(
      node: SchemaNode,
      parent_node: Optional[SchemaNode],
      parent_return_type: TypeAnnotation,
      required_type: TypeAnnotation,
  ) -> None:
      if not typing_utils.issubtype(parent_return_type, required_type):
          parent_node_text = ""
          if parent_node:
              parent_node_text = (
                  f" by the component '{parent_node.uses.__name__}'"
              )
  
          raise GraphSchemaValidationException(
              f"Your component '{node.uses.__name__}' expects an input of type "
              f"'{required_type}' but it receives an input of type '{parent_return_type}'"
              f"{parent_node_text}. "
              f"Please make sure that you registered "
              f"your component correctly and and that your model configuration is "
              f"valid."
              f"See {DOCS_URL_GRAPH_COMPONENTS} for more information."
          )
  
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 21 for calling a global function with example usage: _validate_parent_return_type(node, parent_node, parent_return_type, required_type) without return types