def stream_as_text(stream):
    for data in stream:
        if not isinstance(data, six.text_type):
            data = data.decode('utf-8', 'replace')
        yield data
Loop on `self.check.method` until `self.check.attribute >= count`.
dataset/ETHPy150Open docker/compose/compose/utils.py/stream_as_text--crossover with--dataset/ETHPy150Open serverdensity/sd-agent/tests/checks/integration/test_http_check.py/HTTPCheckTest.wait_for_async