code: def test_gpu_set(change_test_dir, ray_start_regular):
      @ray.remote(
          runtime_env={
              "mpi": {
                  "args": ["-n", "4"],
                  "worker_entry": "test_mpi.check_gpu_setup",
              },
          }
      )
      def f():
          check_gpu_setup()
  
      ray.get(f.options(num_gpus=2).remote())
  
file_path: ray/python/ray/tests/test_mpi.py
imports: import pytest
  import ray
  import sys
  import os
  import numpy
  from ray.runtime_env import mpi_init
label_desc: Use image node_id 7 for calling a global function with example usage: test_gpu_set(change_test_dir, ray_start_regular) without return types