def METHOD_NAME(tracer: Tracer):
    span_context = SpanContext(
        trace_id=int("aabbccddeeff00112233445566778899", 16), span_id=int("0011223344556677", 16), is_remote=False
    )
    link = Link(span_context)
    with tracer.start_as_current_span("testtransaction", links=[link]):
        with tracer.start_as_current_span("testspan", links=[link]):
            pass
    client = tracer.client
    transaction = client.events[constants.TRANSACTION][0]
    span = client.events[constants.SPAN][0]
    assert transaction["links"][0]["trace_id"] == "aabbccddeeff00112233445566778899"
    assert transaction["links"][0]["span_id"] == "0011223344556677"
    assert span["links"][0]["trace_id"] == "aabbccddeeff00112233445566778899"
    assert span["links"][0]["span_id"] == "0011223344556677"