code: def setup_tracing(service_name, endpoint: str = None):
      if not _is_tracing_enabled():
          logger.info("disabled tracing")
          return
  
      from opentelemetry.sdk.resources import SERVICE_NAME, Resource
      from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (
          OTLPSpanExporter,
      )
      from opentelemetry.sdk.trace import TracerProvider
  
      from opentelemetry.sdk.trace.export import (
          BatchSpanProcessor as SpanProcessor,
      )
  
      provider = TracerProvider(
          resource=Resource(attributes={SERVICE_NAME: service_name})
      )
      provider.add_span_processor(
          SpanProcessor(OTLPSpanExporter(endpoint=endpoint))
      )
      trace.set_tracer_provider(provider)
  
imports: import functools
  import logging
  import os
  import time
  import typing
  from typing import List
  from opentelemetry import trace, context
label_desc: Use image node_id 2 for calling a global function with example usage: setup_tracing(service_name, endpoint) without return types