<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_header(self, span_context):
 """Convert a SpanContext object to header string. :type span_context: :class:`~opencensus.trace.span_context.SpanContext` :param span_context: SpanContext object. :rtype: str :returns: A trace context header string in google cloud format. """

        trace_id = span_context.trace_id
        span_id = span_context.span_id
        trace_options = span_context.trace_options.trace_options_byte

        header = '{}/{};o={}'.format(
            trace_id,
            span_id,
            int(trace_options))
        return header