human
I wrote the below code

    def normalize_year(d, yearfrom):
        'Convert    string    to    a    4    digits    year\n                                '
        if (yearfrom < 100):
            raise BucketError((u'%d    must    be    expressed    on    4    digits' % yearfrom))
        if (d < 100):
            if ((d % 100) < (yearfrom % 100)):
                d = (((yearfrom - (yearfrom % 100)) + 100) + d)
            else:
                d = ((yearfrom - (yearfrom % 100)) + d)
        return d
    years = [int(x) for x in re.findall('\\d+', span_str)]
    if (not years):
        raise ui.UserError((u"invalid    range    defined    for    year    bucket    '%s':    no    year    found" % span_str))
    try:
        years = [normalize_year(x, years[0]) for x in years]
    except BucketError as exc:
        raise ui.UserError((u"invalid    range    defined    for    year    bucket    '%s':    %s" % (span_str, exc)))
    res = {'from': years[0], 'str': span_str}
    if (len(years) > 1):
        res['to'] = years[(-1)]
    return res

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

def span_from_str(span_str):