code: def set_otel_exporter():
      from opentelemetry.exporter.otlp.proto.http.trace_exporter import (
          OTLPSpanExporter,
      )
  
      from metaflow.metaflow_config import (
          SERVICE_AUTH_KEY,
          SERVICE_HEADERS,
      )
  
      if SERVICE_AUTH_KEY:
          span_exporter = OTLPSpanExporter(
              endpoint=OTEL_ENDPOINT,
              headers={"x-api-key": SERVICE_AUTH_KEY},
              timeout=1,
          )
      elif SERVICE_HEADERS:
          span_exporter = OTLPSpanExporter(
              endpoint=OTEL_ENDPOINT,
              headers=SERVICE_HEADERS,
              timeout=1,
          )
      else:
          print(
              "WARNING: no auth settings for Opentelemetry",
              file=sys.stderr,
          )
          return
      return span_exporter
  
imports: import sys
  from metaflow.metaflow_config import OTEL_ENDPOINT, ZIPKIN_ENDPOINT, CONSOLE_TRACE_ENABLED
label_desc: Use image node_id 2 for calling a global function with example usage: set_otel_exporter() and returns: span_exporter