<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _on_write(self, sender, *args, **kwargs):
 """ Internal handler for writing to the device. """

        self.on_write(data=kwargs.get('data', None))