@internal<EOL><INDENT>def _on_merge(self, other):<DEDENT>
self._inputs.extend(other._inputs)<EOL>self._outputs.extend(other._outputs)<EOL>if self._sensitivity is not None:<EOL><INDENT>self._sensitivity.extend(other._sensitivity)<EOL><DEDENT>else:<EOL><INDENT>assert other._sensitivity is None<EOL><DEDENT>if self._enclosed_for is not None:<EOL><INDENT>self._enclosed_for.update(other._enclosed_for)<EOL><DEDENT>else:<EOL><INDENT>assert other._enclosed_for is None<EOL><DEDENT>other_was_top = other.parentStm is None<EOL>if other_was_top:<EOL><INDENT>other._get_rtl_context().statements.remove(other)<EOL>for s in other._inputs:<EOL><INDENT>s.endpoints.discard(other)<EOL>s.endpoints.append(self)<EOL><DEDENT>for s in other._outputs:<EOL><INDENT>s.drivers.discard(other)<EOL>s.drivers.append(self)<EOL><DEDENT><DEDENT>
After merging statements update IO, sensitivity and context

:attention: rank is not updated