def METHOD_NAME(self, data):
    if self._proxyWrappedProtocol is not None:
        # If tunnel is already established, proxy dataReceived()
        # calls to the wrapped protocol
        return self._proxyWrappedProtocol.METHOD_NAME(data)
    # process data from the proxy server
    _, status, _ = data.split(b"\r\n")[0].split(b" ", 2)
    if status != b"200":
        return self.transport.loseConnection()
    self._proxyWrappedProtocol = (
        self.factory._proxyWrappedFactory.buildProtocol(
            self.transport.getPeer()))
    self._proxyWrappedProtocol.makeConnection(self.transport)
    self._connectedDeferred.callback(self._proxyWrappedProtocol)
    # forward all traffic directly to the wrapped protocol
    self.transport.protocol = self._proxyWrappedProtocol
    # In case the server sent some data together with its response,
    # forward those to the wrapped protocol.
    remaining_data = data.split(b"\r\n\r\n", 2)[1]
    if remaining_data:
        return self._proxyWrappedProtocol.METHOD_NAME(remaining_data)
    return None