def METHOD_NAME(self, client):
    file_length = 0
    with io.BytesIO() as file_handle:
        stream = client.files.get_file()
        total = len(stream)
        assert not stream.response.internal_response._content_consumed
        for data in stream:
            assert 0 < len(data) <= stream.block_size
            file_length += len(data)
            print("Downloading... {}%".format(int(file_length*100/total)))
            file_handle.write(data)
        assert file_length !=  0
        sample_file = realpath(
            join(cwd, 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())