def METHOD_NAME(tracer: Tracer):
    with tracer.start_as_current_span("test"):
        with tracer.start_as_current_span("testspan", kind=SpanKind.CONSUMER):
            with tracer.start_as_current_span("testspan2"):
                pass
    client = tracer.client
    transaction = client.events[constants.TRANSACTION][0]
    span1 = client.events[constants.SPAN][1]
    span2 = client.events[constants.SPAN][0]
    assert span1["transaction_id"] == span1["parent_id"] == transaction["id"]
    assert span1["name"] == "testspan"
    assert span2["transaction_id"] == transaction["id"]
    assert span2["parent_id"] == span1["id"]
    assert span2["name"] == "testspan2"