code: def test_trainer_run_executor_arguments_choices(
      args_given: dict, args_expected: dict
  ):
      # ddp with mps devices not available (tested separately, just patching here for cross-os testing of other args)
      if lf.accelerators.MPSAccelerator.is_available():
          args_expected["accelerator"] = "cpu"
  
      ret_val, env_vars = _get_args_after_tracer_injection(**args_given)
  
      for k, v in args_expected.items():
          assert ret_val[k] == v
  
      assert env_vars["MASTER_ADDR"] == "1.2.3.4"
      assert env_vars["MASTER_PORT"] == "5"
      assert env_vars["GROUP_RANK"] == "6"
      assert env_vars["RANK"] == str(0 + 6 * 8)
      assert env_vars["LOCAL_RANK"] == "0"
      assert env_vars["WORLD_SIZE"] == str(7 * 8)
      assert env_vars["LOCAL_WORLD_SIZE"] == "8"
      assert env_vars["TORCHELASTIC_RUN_ID"] == "1"
      assert env_vars["LT_CLI_USED"] == "1"
  
file_path: pytorch-lightning/tests/tests_app/components/multi_node/test_fabric.py
imports: import os
  from copy import deepcopy
  from functools import partial
  from unittest import mock
  import lightning.fabric
  import pytest
  from lightning.app.components.multi_node.fabric import _FabricRunExecutor
  from lightning_utilities.core.imports import module_available
  from lightning_utilities.test.warning import no_warning_call
label_desc: Use image node_id 6 for calling a global function with example usage: test_trainer_run_executor_arguments_choices(args_given, args_expected) without return types