human
I wrote the below code

    def publish_condition(cdata):
        kind = cdata['condition-kind']
        ctag = XML.SubElement(cond_publisher, condition_tag)
        class_pkg = 'org.jenkins_ci.plugins.run_condition'
        if (kind == 'always'):
            ctag.set('class', (class_pkg + '.core.AlwaysRun'))
        elif (kind == 'never'):
            ctag.set('class', (class_pkg + '.core.NeverRun'))
        elif (kind == 'boolean-expression'):
            ctag.set('class', (class_pkg + '.core.BooleanCondition'))
            XML.SubElement(ctag, 'token').text = cdata['condition-expression']
        elif (kind == 'current-status'):
            ctag.set('class', (class_pkg + '.core.StatusCondition'))
            wr = XML.SubElement(ctag, 'worstResult')
            wr_name = cdata['condition-worst']
            if (wr_name not in hudson_model.THRESHOLDS):
                raise JenkinsJobsException(('threshold    must    be    one    of    %s' % ',    '.join(hudson_model.THRESHOLDS.keys())))
            wr_threshold = hudson_model.THRESHOLDS[wr_name]
            XML.SubElement(wr, 'name').text = wr_threshold['name']
            XML.SubElement(wr, 'ordinal').text = wr_threshold['ordinal']
            XML.SubElement(wr, 'color').text = wr_threshold['color']
            XML.SubElement(wr, 'completeBuild').text = str(wr_threshold['complete']).lower()
            br = XML.SubElement(ctag, 'bestResult')
            br_name = cdata['condition-best']
            if (br_name not in hudson_model.THRESHOLDS):
                raise JenkinsJobsException(('threshold    must    be    one    of    %s' % ',    '.join(hudson_model.THRESHOLDS.keys())))
            br_threshold = hudson_model.THRESHOLDS[br_name]
            XML.SubElement(br, 'name').text = br_threshold['name']
            XML.SubElement(br, 'ordinal').text = br_threshold['ordinal']
            XML.SubElement(br, 'color').text = br_threshold['color']
            XML.SubElement(br, 'completeBuild').text = str(wr_threshold['complete']).lower()
        elif (kind == 'shell'):
           ...

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

def conditional_publisher(registry, xml_parent, data):