code: def traced(name, attrs={}):
      tracer = trace_api.get_tracer_provider().get_tracer(__name__)
      with tracer.start_as_current_span(name) as span:
          for k, v in attrs.items():
              span.set_attribute(k, v)
          yield
  
imports: import os
  import sys
  from opentelemetry.sdk.trace import TracerProvider
  from opentelemetry.sdk.trace.export import BatchSpanProcessor
  from opentelemetry.propagate import set_global_textmap
  from opentelemetry.sdk.resources import SERVICE_NAME, Resource
  from opentelemetry.trace.span import format_trace_id
  from opentelemetry.propagate import extract, inject
  from functools import wraps
  import contextlib
  from typing import Dict, List, Optional
  from opentelemetry import trace, context
  from .span_exporter import get_span_exporter
label_desc: Use image node_id 7 for calling a global function with example usage: traced(name, attrs) without return types