def _deco_wrapper(func):
    if (not utils.is_trivially_callable(func, non_def_args=1)):
        raise TypeError(f'performance function {func.__name__!r} has more than one argument without a default value')

    @functools.wraps(func)
    def _perf_fn(*args, **kwargs):
        return _DeferredPerformanceExpression(func, units, *args, **kwargs)
    _perf_key = (perf_key if perf_key else func.__name__)
    setattr(_perf_fn, '_rfm_perf_key', _perf_key)
    return _perf_fn
def _deco_wrapper(func):
    if (not utils.is_trivially_callable(func, non_def_args=1)):
        raise TypeError(f'performance function {func.__name__!r} has more than one argument without a default value')

    @functools.wraps(func)
    def _perf_fn(*args, **kwargs):
        return _DeferredPerformanceExpression(func, units, *args, **kwargs)
    _perf_key = (perf_key if perf_key else func.__name__)
    setattr(_perf_fn, '_rfm_perf_key', _perf_key)
    return _perf_fn