def METHOD_NAME(func):
    """Return a function decorator that wraps `func` with tracing."""
    _trace_funcs.add(func.__name__)
    @functools.wraps(func)
    def traced_func(*args, **kwargs):
        # Unfortunately, this function can be called before the `ibis.pandas`
        # attribute has ever been accessed, which means the trace configuration
        # option might never get registered and will raise an error. Accessing
        # the pandas attribute here forces the option initialization
        import ibis
        ibis.pandas  # noqa: B018
        if not options.pandas.enable_trace:
            return func(*args, **kwargs)
        else:
            start = datetime.now()
            _log_trace(func)
            res = func(*args, **kwargs)
            _log_trace(func, start)
            return res
    return traced_func