human
I wrote the below code

    if _actions:
        if (action not in _actions):
            raise KeyError(("Action    '%s'    not    found" % action))
        return _actions.get(action)
    for action_module_name in ['get', 'create', 'update', 'delete', 'patch']:
        module_path = ('ckan.logic.action.' + action_module_name)
        module = __import__(module_path)
        for part in module_path.split('.')[1:]:
            module = getattr(module, part)
        for (k, v) in module.__dict__.items():
            if (not k.startswith('_')):
                if (hasattr(v, '__call__') and ((v.__module__ == module_path) or hasattr(v, '__replaced'))):
                    _actions[k] = v
                    if ((action_module_name == 'get') and (not hasattr(v, 'side_effect_free'))):
                        v.side_effect_free = True
    resolved_action_plugins = {}
    fetched_actions = {}
    chained_actions = defaultdict(list)
    for plugin in p.PluginImplementations(p.IActions):
        for (name, auth_function) in plugin.get_actions().items():
            if _is_chained_action(auth_function):
                chained_actions[name].append(auth_function)
            elif (name in resolved_action_plugins):
                raise NameConflict(('The    action    %r    is    already    implemented    in    %r' % (name, resolved_action_plugins[name])))
            else:
                resolved_action_plugins[name] = plugin.name
                auth_function.auth_audit_exempt = True
                fetched_actions[name] = auth_function
    for (name, func_list) in chained_actions.iteritems():
        if (name not in fetched_actions):
            raise NotFound(('The    action    %r    is    not    found    for    chained    action' % name))
        for func in reversed(func_list):
            prev_func = fetched_actions[name]
            fetched_actions[name] = functools.partial(func, prev_func)
    _actions.update(fetched_actions)
    for (action_name, _action) in _actions.items():
        def make_wrapped(_action, action_name):
          ...

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

def get_action(action):