def METHOD_NAME(exe: pathlib.Path) -> int:
    line = subprocess.check_output((exe, '--version'), text=True)
    m = re.search(r'\(release (.*?)\) .* \(protocol ([0-9]+)\)', line)
    assert m, (f'Unable to extract protocol version number from {exe};\n'
               f'Got {line.rstrip()} on standard output')
    return m.group(1), int(m.group(2))