def rawDataReceived(self, data):
        """
        Read raw data, until the quantity specified by a previous 'len' line is
        reached.
        """
        data, rest = data[:self.length], data[self.length:]
        self.length = self.length - len(data)
        self.received[-1] = self.received[-1] + data
        if self.length == 0:
            self.setLineMode(rest)

        Read raw data, until the quantity specified by a previous 'len' line is
        reached.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/test/test_basic.py