code: def test_agent_fail_reconnect(
      restartable_managed_cluster: ManagedCluster,
  ) -> None:
      restartable_managed_cluster.kill_proxy()
  
      for _ in range(
          150
      ):  # ManagedCluster agents try to reconnect for 24 * 5 seconds. TODO: eh.
          if os.path.exists("/tmp/agent1-connection-lost"):
              restartable_managed_cluster.restart_agent(
                  wait_for_agent=False, wait_for_amnesia=False
              )
              restartable_managed_cluster.restart_proxy()
              break
          time.sleep(1)
      else:
          pytest.fail(
              "Did not find expected file from agent connection loss hook"
          )
  
file_path: determined/e2e_tests/tests/cluster/test_agent.py
imports: import os
  import time
  import pytest
  import determined
  from determined.common import api
  from determined.common.api import authentication, certs
  from tests import config
  from .managed_cluster import ManagedCluster
label_desc: Use image node_id 3 for calling a global function with example usage: test_agent_fail_reconnect(restartable_managed_cluster) without return types