<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract(cls, obj):
 """ Extract span context from the given object :param Any obj: Object to use as context :return: a SpanContext instance extracted from the inner span object or None if no such span context could be found. """

        span = cls.extract_span(obj)
        if span:
            return span.context