

def trace(*predicates, **options):
    '\n    Starts tracing. Can be used as a context manager (with slightly incorrect semantics - it starts tracing\n    before ``__enter__`` is called).\n\n    Parameters:\n        *predicates (callables): Runs actions if **all** of the given predicates match.\n    Keyword Args:\n        clear_env_var: Disables tracing in subprocess. Default: ``False``.\n        threading_support: Enable tracing *new* threads. Default: ``False``.\n        action: Action to run if all the predicates return ``True``. Default: ``CodePrinter``.\n        actions: Actions to run (in case you want more than 1).\n    '
    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 predicates.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)

dataset/ETHPy150Open ionelmc/python-hunter/src/hunter/__init__.py trace/VarMisuse@105/365 `options`->`predicates`