human
I wrote the below code

    @functools.wraps(f)
    def inner(self, context, *args, **kwargs):
        if (context.session.is_active and getattr(context, 'GUARD_TRANSACTION', True)):
            raise RuntimeError((_('Method    %s    cannot    be    called    within    a    transaction.') % f))
        return f(self, context, *args, **kwargs)
    return inner

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def transaction_guard(f):