code: def stop_process(process):
      try:
          process.send_signal(signal.SIGTERM)
          process.communicate(timeout=20)
      except sp.TimeoutExpired:
          process.kill()
          outs, errors = process.communicate(timeout=20)
          exit_code = process.returncode
          msg = "Child process finished {} not in clean way: {} {}".format(
              exit_code, outs, errors
          )
          raise RuntimeError(msg)
  
file_path: ray/python/ray/tests/mock_s3_server.py
imports: import pytest
  import requests
  import shutil
  import signal
  import subprocess
  import time
label_desc: Use image node_id 2 for calling a global function with example usage: stop_process(process) without return types