[docs]@classmethoddefregister_method(cls,func:"Callable",names:"List[str]"):"""Injects methods into a specific stream instance. Parameters ---------- func : `Callable` The function to be injected as a method. names : `List[str]` The names to be given to the function. """defmethod(self,*args,**kwargs):args=(self,)+argsreturnfunc(*args,**kwargs)fornameinnames:setattr(cls,name,method)