def METHOD_NAME(proc: "subprocess.Popen[str]", port: int = 8265) -> None:
    max_tunnel_time = 300
    start = time.time()
    ctr = 0
    while time.time() - start < max_tunnel_time:
        try:
            r = requests.get(f"http://localhost:{port}", timeout=5)
            if r.status_code == 200:
                break
        except requests.exceptions.ConnectionError:
            pass
        except requests.exceptions.ReadTimeout:
            pass
        if ctr + 1 % 10 == 0:
            print(f"Tunnel probe pending: {ctr} ticks...")
        time.sleep(1)
        if proc.poll() is not None:
            pytest.fail(f"Tunnel process has exited prematurely, return code: {proc.returncode}")
        ctr += 1
    else:
        pytest.fail(f"Failed to probe the tunnel after {max_tunnel_time} seconds")
    print(f"Tunnel probe done after {ctr} ticks.")