code: def compute_pi(samples):
      count = 0
      for x, y in samples:
          if x**2 + y**2 <= 1:
              count += 1
      pi = 4 * float(count) / len(samples)
      return pi
  
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 2 for calling a global function with example usage: compute_pi(samples) and returns: pi