async def METHOD_NAME():
    from bodyfileversiontolerant.aio import AutoRestSwaggerBATFileService
    client = AutoRestSwaggerBATFileService(connection_data_block_size=1000)
    file_length = 0
    with io.BytesIO() as file_handle:
        request = HttpRequest("GET", "/files/stream/nonempty",
            headers={
                'Accept': 'image/png, application/json'
            },
        )
        response = await client.send_request(request, stream=True)
        assert response.status_code == 200
        assert not response._internal_response._released
        async for data in response.iter_bytes():
            assert 0 < len(data) <= response.block_size
            file_length += len(data)
            file_handle.write(data)
        assert file_length !=  0
        sample_file = realpath(
            join(cwd, pardir, pardir, pardir, pardir, pardir,
                "node_modules", "@microsoft.azure", "autorest.testserver", "routes", "sample.png"))
        with open(sample_file, 'rb') as data:
            sample_data = hash(data.read())
        assert sample_data == hash(file_handle.getvalue())