def hook(self, *args, **kwargs): if not trace_inputs.can_trace(): self.fail('Please rerun this test with admin privileges.') return fn(self, *args, **kwargs)