def METHOD_NAME(command, cwd=None):
    popen = subprocess.Popen(
        command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=cwd
    )
    assert popen.stdout is not None
    return iter(popen.stdout.readline, b"")