def decode_spans(self, spans):
decoded_spans = []<EOL>transport = TMemoryBuffer(spans)<EOL>if six.byte2int(spans) == TType.STRUCT:<EOL><INDENT>_, size = read_list_begin(transport)<EOL><DEDENT>else:<EOL><INDENT>size = <NUM_LIT:1><EOL><DEDENT>for _ in range(size):<EOL><INDENT>span = zipkin_core.Span()<EOL>span.read(TBinaryProtocol(transport))<EOL>decoded_spans.append(self._decode_thrift_span(span))<EOL><DEDENT>return decoded_spans<EOL>
Decodes an encoded list of spans.

        :param spans: encoded list of spans
        :type spans: bytes
        :return: list of spans
        :rtype: list of Span