class_docstr: Implement a manager class to add the new component properly.
  The component can be added as either class or function type.
  
  Args:
      name (str): The name of component.
  
  Returns:
      A callable object of ComponentManager.
  
  Examples 1:
  
      from paddleseg.cvlibs.manager import ComponentManager
  
      model_manager = ComponentManager()
  
      class AlexNet: ...
      class ResNet: ...
  
      model_manager.add_component(AlexNet)
      model_manager.add_component(ResNet)
  
      # Or pass a sequence alliteratively:
      model_manager.add_component([AlexNet, ResNet])
      print(model_manager.components_dict)
      # {'AlexNet': <class '__main__.AlexNet'>, 'ResNet': <class '__main__.ResNet'>}
  
  Examples 2:
  
      # Or an easier way, using it as a Python decorator, while just add it above the class declaration.
      from paddleseg.cvlibs.manager import ComponentManager
  
      model_manager = ComponentManager()
  
      @model_manager.add_component
      class AlexNet: ...
  
      @model_manager.add_component
      class ResNet: ...
  
      print(model_manager.components_dict)
      # {'AlexNet': <class '__main__.AlexNet'>, 'ResNet': <class '__main__.ResNet'>}
class_docstr_tok: ["Implement","a","manager","class","to","add","the","new","component","properly",".","The","component","can","be","added","as","either","class","or","function","type",".","Args",":","name","(","str",")",":","The","name","of","component",".","Returns",":","A","callable","object","of","ComponentManager",".","Examples","1",":","from","paddleseg.cvlibs.manager","import","ComponentManager","model_manager","=","ComponentManager","(",")","class","AlexNet",":","...","class","ResNet",":","...","model_manager.add_component","(","AlexNet",")","model_manager.add_component","(","ResNet",")","#","Or","pass","a","sequence","alliteratively",":","model_manager.add_component","(","[","AlexNet",",","ResNet","]",")","print","(","model_manager.components_dict",")","#","{","'AlexNet","'",":","<","class","'__main__.AlexNet","'",">",",","'ResNet","'",":","<","class","'__main__.ResNet","'",">","}","Examples","2",":","#","Or","an","easier","way",",","using","it","as","a","Python","decorator",",","while","just","add","it","above","the","class","declaration",".","from","paddleseg.cvlibs.manager","import","ComponentManager","model_manager","=","ComponentManager","(",")","@","model_manager.add_component","class","AlexNet",":","...","@","model_manager.add_component","class","ResNet",":","...","print","(","model_manager.components_dict",")","#","{","'AlexNet","'",":","<","class","'__main__.AlexNet","'",">",",","'ResNet","'",":","<","class","'__main__.ResNet","'",">","}"]
code: def __getitem__(self, item):
      if item not in self._components_dict.keys():
          raise KeyError(
              "{} does not exist in availabel {}".format(item, self)
          )
      return self._components_dict[item]
  
file_path: PaddleSeg/contrib/MedicalSeg/medicalseg/cvlibs/manager.py
imports: import inspect
  from collections.abc import Sequence
  import warnings
label_desc: Use image node_id 4 for calling the ComponentManager obj's underlying member method code with example usage: obj.__getitem__(item) and returns: self