code: def sync_actor_helper():
      """Run a Ray sync actor and check the spans produced."""
  
      @ray.remote
      class Counter(object):
          def __init__(self):
              self.value = 0
  
          def increment(self):
              self.value += 1
              return self.value
  
      # Create an actor from this class.
      counter = Counter.remote()
      obj_ref = counter.increment.remote()
      assert ray.get(obj_ref) == 1
  
      span_list = get_span_list()
      assert len(span_list) == 4
  
      # 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 == {
          "sync_actor_helper.<locals>.Counter.__init__ ray.remote": 1,
          "sync_actor_helper.<locals>.Counter.increment ray.remote": 1,
          "Counter.__init__ ray.remote_worker": 1,
          "Counter.increment ray.remote_worker": 1,
      }, span_names
  
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 8 for calling a global function with example usage: sync_actor_helper() and returns: self