def METHOD_NAME(stats_tracer):
    """
    This is a variation on the tracer that has the SpanStatsProcessor disabled until we leave the tracer context.
    """
    stats_tracer.trace = functools.partial(consistent_end_trace, stats_tracer.trace)
    # Stop the stats processor while running the function, to prevent flushing
    for processor in stats_tracer._span_processors:
        if isinstance(processor, SpanStatsProcessorV06):
            processor.stop()
            break
    yield stats_tracer
    # Restart the stats processor; it will be flushed during shutdown
    processor.start()