<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _read_data(self):
 """ Reads data from the connection and adds it to _push_packet, until the connection is closed or the task in cancelled. """

        while True:
            try:
                data = yield from self._socket.recv()
            except asyncio.CancelledError:
                break
            except ConnectionClosed:
                break

            self._push_packet(data)

        self._loop.call_soon(self.close)