def METHOD_NAME(gcloud_run, subprocess):
    runner.invoke(cli.app, ['connect', 'test-cluster', 'notebook'])
    gcloud_args = gcloud_run.call_args[0][0]
    assert gcloud_args[:2] == ["compute", "ssh"]
    assert gcloud_args[2][(gcloud_args[2].find("@") + 1):] == "test-cluster-m"
    assert "--ssh-flag=-D 10000" in gcloud_args
    assert "--ssh-flag=-N" in gcloud_args
    assert "--ssh-flag=-f" in gcloud_args
    assert "--ssh-flag=-n" in gcloud_args
    popen_args = subprocess.Popen.call_args[0][0]
    assert popen_args[0] == "chromium"
    assert popen_args[1].startswith("http://localhost")
    assert "--proxy-server=socks5://localhost:10000" in popen_args
    assert "--host-resolver-rules=MAP * 0.0.0.0 , EXCLUDE localhost" in popen_args
    assert "--proxy-bypass-list=<-loopback>" in popen_args
    assert any(arg.startswith("--user-data-dir=") for arg in popen_args)