in processor.py [0:0]
def __add__(self, other: Self | Processor) -> PartProcessor | Processor:
"""Adds `other` to this processor.
Args:
other: a processor to add to `self`.
Returns:
The chain of this process with `other`.
"""
if isinstance(other, _ChainPartProcessor):
return _ChainPartProcessor([self] + other._processor_list)
elif isinstance(other, _ChainProcessor):
return _ChainProcessor([self.to_processor().call] + other._processor_list)
elif isinstance(other, Processor):
return _ChainProcessor([self.to_processor().call, other])
else:
return _ChainPartProcessor([self, other])