<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def write(self, data):
 """Writes a chunk of data to the streaming response. :param data: bytes-ish data to be written. """

        if type(data) != bytes:
            data = self._encode_body(data)

        self.protocol.push_data(b"%x\r\n%b\r\n" % (len(data), data))
        await self.protocol.drain()