human
I wrote the below code

    def decorator(self, *args, **kwargs):
        from taiga.base.utils.db import get_typename_for_model_class
        pk = self.kwargs.get(self.pk_url_kwarg, None)
        tn = get_typename_for_model_class(self.get_queryset().model)
        key = '{0}:{1}'.format(tn, pk)
        with advisory_lock(key):
            return func(self, *args, **kwargs)
    return decorator

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

def model_pk_lock(func):