code: def to_carrier(self, span_context, carrier):
          
          carrier[_TRACE_ID_KEY] = str(span_context.trace_id)
  
          if span_context.span_id is not None:
              carrier[_SPAN_ID_KEY] = str(span_context.span_id)
  
          carrier[_TRACE_OPTIONS_KEY] = str(
              span_context.trace_options.trace_options_byte)
  
          return carrier
docs: Inject the SpanContext fields to carrier dict.
  
          :type span_context:
              :class:`~opencensus.trace.span_context.SpanContext`
          :param span_context: SpanContext object.
  
          :type carrier: dict
          :param carrier: The carrier which holds the trace_id, span_id, options
                          information from a SpanContext.
  
          :rtype: dict
          :returns: The carrier which holds the span context information.