def __init__(self, transport, protocol, reader, loop):
self._transport = transport
self._protocol = protocol
# drain() expects that the reader has a exception() method
assert reader is None or isinstance(reader, StreamReader)
self._reader = reader
self._loop = loop
writer = asyncio.StreamWriter(writer, {'high_water': 256*1024})
TypeError: StreamWriter.__init__() missing 2 required positional arguments: 'reader' and 'loop'