docs: def _startRelay(self, client):
          """Start relaying data between the process and the protocol.
          This method is called when the protocol is connected.
          """
          process = client.transport.connector.process
          # Relay any buffered data that was received from the process before
          # we got connected and started relaying.
          for _, data in process.data:
              client.dataReceived(data)
          process.protocol = client
  
          @process._endedDeferred.addBoth
          def stopRelay(reason):
              """Stop relaying data. Called when the process has ended.
              """
              relay = client.transport
              relay.loseConnection(reason)
              connector = relay.connector
              connector.connectionLost(reason)
  
          # Pass through the client protocol.
          return client