code: def ray_start_cli_tracing(scope="function"):
      """Start ray with tracing-startup-hook, and clean up at end of test."""
      check_call_ray(
          ["stop", "--force"],
      )
      check_call_ray(
          [
              "start",
              "--head",
              "--tracing-startup-hook",
              setup_tracing_path,
          ],
      )
      yield
      ray.shutdown()
      check_call_ray(["stop", "--force"])
  
imports: import asyncio
  import glob
  import json
  import os
  import pytest
  import shutil
  from unittest.mock import patch
  import ray
  from ray._private.test_utils import check_call_ray
  from ray.util.tracing.setup_local_tmp_tracing import spans_dir
label_desc: Use image node_id 2 for calling a global function with example usage: ray_start_cli_tracing(scope) without return types