<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_translated(self, name, value, event=None):
 """Send a translated write request to the VI. """

        data = {'name': name}
        if value is not None:
            data['value'] = self._massage_write_value(value)
        if event is not None:
            data['event'] = self._massage_write_value(event);
        message = self.streamer.serialize_for_stream(data)
        bytes_written = self.write_bytes(message)
        assert bytes_written == len(message)
        return bytes_written