code: def test_filter_env_vars() -> None:
      env_in = {
          "BASH_FUNC_xyz": "drop",
          "KEEP_BASH_FUNC": "keep",
          "OLDPWD": "drop",
          "HOSTNAME": "drop",
          "CUDA_VISIBLE_DEVICES": "drop",
          "APPTAINER_CUDA_VISIBLE_DEVICES": "drop",
          "SLURM_PROCID": "drop",
          "DET_SLOT_IDS": "drop",
          "DET_AGENT_ID": "drop",
          "DET_USER_TOKEN": "keep",
          "DET_SESSION_TOKEN": "keep",
          "RANDOM_USER_VAR": "keep",
      }
      env_out = launch.deepspeed.filter_env_vars(env_in)
      env_exp = {k: v for k, v in env_in.items() if v == "keep"}
      assert env_out == env_exp
  
file_path: determined/harness/tests/launch/test_deepspeed.py
imports: import os
  import time
  from typing import Any, List
  from unittest import mock
  import pytest
  from deepspeed.launcher.runner import DEEPSPEED_ENVIRONMENT_NAME
  import determined.launch.deepspeed
  from determined import constants, launch
  from tests.launch import test_util
label_desc: Use image node_id 7 for calling a global function with example usage: test_filter_env_vars() without return types