code: def test_max_active_connections_env_var():
      num_workers = 2
      process_runner = MockProcessRunner()
      provider = MockProvider()
      instance = MockTpuInstance(num_workers=num_workers)
      provider.create_node({}, {}, 1)
      cluster_name = "cluster"
      docker_config = {"container_name": "container"}
      args = {
          "instance": instance,
          "log_prefix": "prefix",
          "node_id": "0",
          "provider": provider,
          "auth_config": auth_config,
          "cluster_name": cluster_name,
          "process_runner": process_runner,
          "use_internal_ip": False,
          "docker_config": docker_config,
      }
      cmd_runner = TPUCommandRunner(**args)
      os.environ[
          ray_constants.RAY_TPU_MAX_CONCURRENT_CONNECTIONS_ENV_VAR
      ] = "1"
      num_connections = cmd_runner.num_connections
      assert type(num_connections) == int
      assert num_connections == 1
  
file_path: ray/python/ray/tests/gcp/test_gcp_tpu_command_runner.py
imports: import pytest
  import os
  from ray.tests.test_autoscaler import MockProvider, MockProcessRunner
  from ray.autoscaler._private.gcp.tpu_command_runner import TPUCommandRunner
  from ray.autoscaler._private.command_runner import SSHCommandRunner
  from ray._private import ray_constants
  from getpass import getuser
  import hashlib
  from unittest.mock import patch
label_desc: Use image node_id 4 for calling a global function with example usage: test_max_active_connections_env_var() without return types