<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_headers(self, headers):
 """Generate a SpanContext object using the trace context header. :type headers: dict :param headers: HTTP request headers. :rtype: :class:`~opencensus.trace.span_context.SpanContext` :returns: SpanContext generated from the trace context header. """

        if headers is None:
            return SpanContext()
        header = headers.get(_TRACE_CONTEXT_HEADER_NAME)
        if header is None:
            return SpanContext()
        header = str(header.encode('utf-8'))
        return self.from_header(header)