'\'write()\' callable as specified by PEP 333'

def write(self, data):

    assert isinstance(data, str), 'write()    argument    must    be    string'
    if (not self.status):
        raise AssertionError('write()    before    start_response()')
    elif (not self.headers_sent):
        self.bytes_sent = len(data)
        self.send_headers()
    else:
        self.bytes_sent += len(data)
    length = len(data)
    if (length > 33554432):
        offset = 0
        while (offset < length):
            chunk_size = min(33554432, length)
            self._write(data[offset:(offset + chunk_size)])
            self._flush()
            offset += chunk_size
    else:
        self._write(data)
        self._flush()
