code: def task_helper():
      """Run a Ray task and check the spans produced."""
  
      @ray.remote
      def f(value):
          return value + 1
  
      obj_ref = f.remote(2)
      ray.get(obj_ref)
  
      span_list = get_span_list()
      assert len(span_list) == 2, span_list
  
      # The spans could show up in a different order, so just check that
      # all spans are as expected
      span_names = get_span_dict(span_list)
      assert span_names == {
          "test_tracing.f ray.remote": 1,
          "test_tracing.f ray.remote_worker": 1,
      }
  
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 7 for calling a global function with example usage: task_helper() and returns: unknown