human
Here's a good function header given the following:
I wrote the below code

    if (state is None):
        state = ConflictResolverState()
    state.remaining_actions.extend(normalize_actions(actions))
    actions = state.remaining_actions
    def orderandpos(v):
        (n, v) = v
        return ((v['order'] or 0), n)
    def orderonly(v):
        (n, v) = v
        return (v['order'] or 0)
    sactions = sorted(enumerate(actions, start=state.start), key=orderandpos)
    for (order, actiongroup) in itertools.groupby(sactions, orderonly):
        output = []
        unique = {}
        if ((state.min_order is not None) and (order < state.min_order)):
            r = ['Actions    were    added    to    order={0}    after    execution    had    moved    on    to    order={1}.    Conflicting    actions:    '.format(order, state.min_order)]
            for (i, action) in actiongroup:
                for line in str(action['info']).rstrip().split('\n'):
                    r.append(('        ' + line))
            raise ConfigurationError('\n'.join(r))
        for (i, action) in actiongroup:
            ainfo = (i, action)
            discriminator = undefer(action['discriminator'])
            action['discriminator'] = discriminator
            if (discriminator is None):
                output.append(ainfo)
                continue
            L = unique.setdefault(discriminator, [])
            L.append(ainfo)
        conflicts = {}
        for (discriminator, ainfos) in unique.items():
            def bypath(ainfo):
                (path, i) = (ainfo[1]['includepath'], ainfo[0])
                return (path, order, i)
            ainfos.sort(key=bypath)
            (ainfo, rest) = (ainfos[0], ainfos[1:])
            (_, action) = ainfo
            prev_ainfo = state.resolved_ainfos.get(discriminator)
            if (prev_ainfo is not None):
                (_, paction) = prev_ainfo
                (basepath, baseinfo) = (paction['includepath'], paction['info'])
                includepath = action['includepath']
                if ((includepath[:len(basepath)] != basepath) or...

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

def resolveConflicts(actions, state=None):