code: def component_config_type_from_type_name(cls, type_name: str) -> Type:
      options = Registry.subconfigs(cls)
      for option in options:
          if type_name.lower() == _canonical_typename(option).lower():
              return option
      else:
          raise Exception(
              f"could not find specified component class {type_name}"
          )
  
imports: from enum import Enum
  from typing import Any, Dict, List, Tuple, Type, Union
  from pytext.common.utils import eprint
  from .component import Registry
  from .config_adapter import upgrade_to_latest
  from .pytext_config import PyTextConfig
label_desc: Use image node_id 11 for calling a global function with example usage: component_config_type_from_type_name(cls, type_name) and returns: option