class_docstr: See module's docstring.
  
  Args:
      class_: the class that Canals should use as a component.
      serializable: whether to check, at init time, if the component can be saved with
      `save_pipelines()`.
  
  Returns:
      A class that can be recognized as a component.
  
  Raises:
      ComponentError: if the class provided has no `run()` method or otherwise doesn't respect the component contract.
class_docstr_tok: ["See","module","'s","docstring",".","Args",":","class_",":","the","class","that","Canals","should","use","as","a","component",".","serializable",":","whether","to","check",",","at","init","time",",","if","the","component","can","be","saved","with","`","save_pipelines","(",")","`",".","Returns",":","A","class","that","can","be","recognized","as","a","component",".","Raises",":","ComponentError",":","if","the","class","provided","has","no","`","run","(",")","`","method","or","otherwise","does","n't","respect","the","component","contract","."]
code: def __init__(self):
      self.registry = {}
  
imports: import logging
  import inspect
  from typing import Protocol, runtime_checkable, Any
  from types import new_class
  from copy import deepcopy
  from haystack.core.component.sockets import InputSocket, OutputSocket, _empty
  from haystack.core.errors import ComponentError
label_desc: Use image node_id 1 to create a new _Component object  with example: obj = _Component()