def METHOD_NAME(tracer):
    """
    When a fork occurs with an open span then the child process should not have
    a strong reference to the span because it might never be closed.
    """
    wd = WeakValueDictionary()
    span = trace(wd, tracer, "span")
    pid = os.fork()
    if pid == 0:
        assert len(wd) == 1
        gc.collect()
        # span is still open and in the context
        assert len(wd) == 1
        span2 = trace(wd, tracer, "span2")
        assert span2._parent is None
        assert len(wd) == 2
        span2.finish()
        del span2
        # Expect there to be one span left (the original from before the fork)
        # which is inherited into the child process but will never be closed.
        # The important thing in this test case is all new spans created in the
        # child will be gc'd.
        gc.collect()
        assert len(wd) == 1
        # Normally, if the child process leaves this function frame the span
        # reference would be lost and it would be free to be gc'd. We delete
        # the reference explicitly here to mimic this scenario.
        del span
        gc.collect()
        assert len(wd) == 0
        os._exit(12)
    assert len(wd) == 1
    span.finish()
    del span
    gc.collect()
    assert len(wd) == 0
    _, status = os.waitpid(pid, 0)
    exit_code = os.WEXITSTATUS(status)
    assert exit_code == 12