<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def send(self, data):
 """ Send `data` across the data channel to the remote peer. """

        if self.readyState != 'open':
            raise InvalidStateError

        if not isinstance(data, (str, bytes)):
            raise ValueError('Cannot send unsupported data type: %s' % type(data))

        self.transport._data_channel_send(self, data)