<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_transport(self, data):
 """ Write data to media transport. The data is encoded using the SBC codec and RTP encapsulated before being written to the transport file descriptor. :param array{byte} data: Payload data to encode, encapsulate and send. """

        if ('w' not in self.access_type):
            raise BTIncompatibleTransportAccessType
        return self.codec.encode(self.fd, self.write_mtu, data)