code: def add(
      cls,
      component_type: ComponentType,
      cls_to_add: Type,
      config_cls: Type,
  ):
      component = cls._registered_components[component_type]
      if config_cls in component:
          raise RegistryError(
              f"Cannot add {cls_to_add} to {component_type} "
              f"for task_config type {config_cls}; "
              f"it's already registered for {component[config_cls]}"
          )
      component[config_cls] = cls_to_add
  
imports: import collections
  import enum
  from typing import Any, Dict, List, Tuple, Type, Union
  import torch
  from pytext.utils.usage import log_class_usage
  from .pytext_config import ConfigBase, PyTextConfig
label_desc: Use image node_id 1 for calling the Registry obj's underlying member method code with example usage: obj.add(cls, component_type, cls_to_add, config_cls) without return types