code: def test_agent_version() -> None:
      # TODO: refactor tests to not use cli singleton auth.
      certs.cli_cert = certs.default_load(conf.make_master_url())
      authentication.cli_auth = authentication.Authentication(
          conf.make_master_url()
      )
      # DET_AGENT_VERSION is available and specifies the agent version in cross-version tests; for
      # other tests, this evaluates to the current version.
      target_version = (
          os.environ.get("DET_AGENT_VERSION") or determined.__version__
      )
  
      agents = api.get(conf.make_master_url(), "api/v1/agents").json()[
          "agents"
      ]
      assert all(agent["version"] == target_version for agent in agents)
  
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 1 for calling a global function with example usage: test_agent_version() without return types