code: def test_tag_env_vars(ray_start_4_cpus, mock_record, tuner):
      """Test that env vars are recorded properly, and arbitrary user environment
      variables are ignored."""
      env_vars_to_record = {
          "TUNE_GLOBAL_CHECKPOINT_S": "20",
          "TUNE_MAX_PENDING_TRIALS_PG": "1",
      }
      untracked_env_vars = {"RANDOM_USER_ENV_VAR": "asdf"}
  
      with patch.dict(
          os.environ, {**env_vars_to_record, **untracked_env_vars}
      ):
          tuner.fit()
  
      recorded_env_vars = json.loads(mock_record[TagKey.AIR_ENV_VARS])
      assert sorted(env_vars_to_record) == sorted(recorded_env_vars)
  
imports: import json
  import os
  from packaging.version import Version
  import pyarrow.fs
  import pytest
  from unittest.mock import MagicMock, patch
  import ray
  from ray import train, tune
  from ray.air._internal import usage
  from ray.air._internal.usage import AirEntrypoint
  from ray.air.integrations import wandb, mlflow, comet
  from ray.train._internal.storage import StorageContext
  from ray.tune.callback import Callback
  from ray.tune.experiment.experiment import Experiment
  from ray.tune.logger import LoggerCallback
  from ray.tune.logger.aim import AimLoggerCallback
  from ray.tune.utils.callback import DEFAULT_CALLBACK_CLASSES
  from ray._private.usage.usage_lib import TagKey
label_desc: Use image node_id 11 for calling a global function with example usage: test_tag_env_vars(ray_start_4_cpus, mock_record, tuner) without return types