code: def get_span_dict(span_list):
      """Given a list of span names, return dictionary of span names."""
      strip_prefix = "python.ray.tests."
      span_names = {}
      for span in span_list:
          span_name = span["name"]
          if span_name.startswith(strip_prefix):
              span_name = span_name[len(strip_prefix) :]
          if span_name in span_names:
              span_names[span_name] += 1
          else:
              span_names[span_name] = 1
      return 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 6 for calling a global function with example usage: get_span_dict(span_list) and returns: span_names