def METHOD_NAME(version):
    this_script_dir = pathlib.Path(__file__).parent
    executable = this_script_dir / "../../scripts/get-previous-y-stream.sh"
    # subprocess.run()'s  capture_output=True argument first appeared in Python 3.7 which is not available universally
    # (e.g. in our upstream builder image), therefore we capture stdout with a bit dated check_output() call.
    return subprocess.check_output([executable, version], encoding='utf-8').strip()