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

    def digit_set_wildcard(chars):
        '\n                                Makes    a    wildcard    expression    for    the    set,    a    bit    readable,    e.g.    [1-5].\n                                '
        chars = sorted(chars)
        if ((len(chars) > 1) and ((ord(chars[(-1)]) - ord(chars[0])) == (len(chars) - 1))):
            return ('[%s-%s]' % (chars[0], chars[(-1)]))
        else:
            return ('[%s]' % ''.join(chars))
    current = {glob: paths}
    while True:
        pos = list(current.keys())[0].find('[0-9]')
        if (pos == (-1)):
            return list(current.keys())
        char_sets = {}
        for (g, p) in six.iteritems(current):
            char_sets[g] = sorted(set((path[pos] for path in p)))
        if (sum((len(s) for s in char_sets.values())) > limit):
            return [g.replace('[0-9]', digit_set_wildcard(char_sets[g]), 1) for g in current]
        for (g, s) in six.iteritems(char_sets):
            for c in s:
                new_glob = g.replace('[0-9]', c, 1)
                new_paths = list(filter((lambda p: (p[pos] == c)), current[g]))
                current[new_glob] = new_paths
            del current[g]

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

def _constrain_glob(glob, paths, limit=5):