def METHOD_NAME(self, component):
    """
    Add a single component into the corresponding manager.
    Args:
        component (function|class): A new component.
    Raises:
        TypeError: When `component` is neither class nor function.
        KeyError: When `component` was added already.
    """
    # 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