def __iadd__(self, other):
if isinstance(other, Family):<EOL><INDENT>if other.template == self.template:<EOL><INDENT>self.detections.extend(other.detections)<EOL>self.__catalog.events.extend(get_catalog(other.detections))<EOL><DEDENT>else:<EOL><INDENT>raise NotImplementedError('<STR_LIT>')<EOL><DEDENT><DEDENT>elif isinstance(other, Detection) and other.template_name== self.template.name:<EOL><INDENT>self.detections.append(other)<EOL>self.__catalog.events.extend(get_catalog([other]))<EOL><DEDENT>elif isinstance(other, Detection):<EOL><INDENT>raise NotImplementedError('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>raise NotImplementedError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>return self<EOL>
Rich method '+='

.. rubric:: Example

>>> family_a = Family(template=Template(name='a'))
>>> family_b = Family(template=Template(name='a'))
>>> family_a += family_b
>>> print(family_a)
Family of 0 detections from template a