def trace(*predicates, **options):
    global _last_tracer

    clear_env_var = options.pop("clear_env_var", False)
    threading_support = (
        options.pop("threading_support", False) or
        options.pop("threads_support", False) or
        options.pop("thread_support", False) or
        options.pop("threadingsupport", False) or
        options.pop("threadssupport", False) or
        options.pop("threadsupport", False) or
        options.pop("threading", False) or
        options.pop("threads", False) or
        options.pop("thread", False)
    )
    predicate = _prepare_predicate(*predicates, **options)

    if clear_env_var:
        os.environ.pop("PYTHONHUNTER", None)

    _last_tracer = Tracer(threading_support)

    @atexit.register
    def atexit_cleanup(ref=weakref.ref(_last_tracer)):
        maybe_tracer = ref()
        if maybe_tracer is not None:
            maybe_tracer.stop()

    return _last_tracer.trace(predicate)
Starts tracing. Can be used as a context manager (with slightly incorrect semantics - it starts tracing
dataset/ETHPy150Open ionelmc/python-hunter/src/hunter/__init__.py/trace