code: def test_mpi_func_pi(change_test_dir, ray_start_regular):
      @ray.remote(
          runtime_env={
              "mpi": {
                  "args": ["-n", "4"],
                  "worker_entry": "test_mpi.run",
              },
          }
      )
      def calc_pi():
          mpi_init()
          return run()
  
      assert "3.14" == "%.2f" % (ray.get(calc_pi.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 4 for calling a global function with example usage: test_mpi_func_pi(change_test_dir, ray_start_regular) and returns: run