human
I wrote the below code

    def Decorator(f):
        'Initialised    Decorator.'
        @functools.wraps(f)
        def Decorated(self, msg):
            'A    decorator    that    assists    in    enforcing    EventListener    restrictions.'
            if (auth_required and (msg.auth_state != msg.AuthorizationState.AUTHENTICATED)):
                raise RuntimeError(('Message    from    %s    not    authenticated.' % msg.source))
            if ((not allow_client_access) and msg.source and rdf_client.ClientURN.Validate(msg.source)):
                raise RuntimeError('Event    does    not    support    clients.')
            if source_restriction:
                source_check_method = getattr(self, 'CheckSource')
                if (not source_check_method):
                    raise RuntimeError('CheckSource    method    not    found.')
                if (not source_check_method(msg.source)):
                    raise RuntimeError('Message    source    invalid.')
            stats.STATS.IncrementCounter('grr_worker_states_run')
            rdf_msg = rdf_flows.GrrMessage(msg)
            res = f(self, message=rdf_msg, event=rdf_msg.payload)
            return res
        return Decorated
    return Decorator

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

def EventHandler(source_restriction=False, auth_required=True, allow_client_access=False):