async def stream_response(self, send: Send) -> None:
    (await send({'type': 'http.response.start', 'status': self.status_code, 'headers': self.raw_headers}))
    async for chunk in self.body_iterator:
        if (not isinstance(chunk, (bytes, memoryview))):
            chunk = chunk.encode(self.charset)
        (await send({'type': 'http.response.body', 'body': chunk, 'more_body': True}))
    (await send({'type': 'http.response.body', 'body': b'', 'more_body': False}))
async def stream_response(self, send: Send) -> None:
    (await send({'type': 'http.response.start', 'status': self.status_code, 'headers': self.raw_headers}))
    async for chunk in self.body_iterator:
        if (not isinstance(chunk, (bytes, memoryview))):
            chunk = chunk.encode(self.charset)
        (await send({'type': 'http.response.body', 'body': chunk, 'more_body': True}))
    (await send({'type': 'http.response.body', 'body': b, 'more_body': False}))