human
I wrote the below code

    @wraps(func)
    def wrapper(*args, **kwargs):
        user = getattr(g, 'user', None)
        event_id = kwargs.get('event_id')
        if (not event_id):
            raise ServerError()
        get_object_or_404(EventModel, event_id)
        if (user and (user.has_role(event_id) or user.is_staff)):
            return func(*args, **kwargs)
        else:
            raise PermissionDeniedError()
    return wrapper

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

def can_access(func):