code: def _add_single_component(self, component):
      # Currently only support class or function type
      if not (
          inspect.isclass(component) or inspect.isfunction(component)
      ):
          raise TypeError(
              "Expect class/function type, but received {}".format(
                  type(component)
              )
          )
  
      # Obtain the internal name of the component
      component_name = component.__name__
  
      # Check whether the component was added already
      if component_name in self._components_dict.keys():
          raise KeyError("{} exists already!".format(component_name))
      else:
          # Take the internal name of the component as its key
          self._components_dict[component_name] = component
  
file_path: PaddleSeg/EISeg/eiseg/util/manager.py
imports: import inspect
  from collections.abc import Sequence
label_desc: Use image node_id 10 for calling the ComponentManager obj's underlying member method code with example usage: obj._add_single_component(component) without return types