human
I wrote the below code

    def _execute(pkg):
        condition = (pkg.name if (when is None) else when)
        when_spec = parse_anonymous_spec(condition, pkg.name)
        when_spec_list = pkg.conflicts.setdefault(conflict_spec, [])
        when_spec_list.append(when_spec)
    return _execute

What's a good function header?

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

@directive('conflicts')
def conflicts(conflict_spec, when=None):