def METHOD_NAME(v):
    if v.startswith('amendments'):
        # kludge due to hex digits in commit hashes
        return 'amendments'
    m = stem_re.match(v)
    if m == None:
        print >>sys.stderr, 'Cannot find stem of %s' % v
        sys.exit(1)
    s = m.group(0)
    if s.endswith('-'): s = s[0:-1]
    return s