code: def trace_id(self) -> t.Optional[int]:
      from opentelemetry import trace
  
      span = trace.get_current_span()
      if span is None:
          return None
      return span.get_span_context().trace_id
  
imports: from __future__ import annotations
  import contextlib
  import contextvars
  import os
  import typing
  from abc import ABC
  from abc import abstractmethod
  from typing import TYPE_CHECKING
  import attr
  import starlette.datastructures
  from .utils.http import Cookie
label_desc: Use image node_id 1 for calling the _ServiceTraceContext obj's underlying member method code with example usage: obj.trace_id() and returns: span, None