human
I wrote the below code

    def ftypelet(mode):
        if (stat.S_ISREG(mode) or (not stat.S_IFMT(mode))):
            return '-'
        if stat.S_ISBLK(mode):
            return 'b'
        if stat.S_ISCHR(mode):
            return 'c'
        if stat.S_ISDIR(mode):
            return 'd'
        if stat.S_ISFIFO(mode):
            return 'p'
        if stat.S_ISLNK(mode):
            return 'l'
        if stat.S_ISSOCK(mode):
            return 's'
        return '?'
    chars = [ftypelet(mode), 'r', 'w', 'x', 'r', 'w', 'x', 'r', 'w', 'x']
    for i in xrange(1, 10):
        if (not (mode & (1 << (9 - i)))):
            chars[i] = '-'
    if (mode & stat.S_ISUID):
        if (chars[3] != 'x'):
            chars[3] = 'S'
        else:
            chars[3] = 's'
    if (mode & stat.S_ISGID):
        if (chars[6] != 'x'):
            chars[6] = 'S'
        else:
            chars[6] = 's'
    if (mode & stat.S_ISVTX):
        if (chars[9] != 'x'):
            chars[9] = 'T'
        else:
            chars[9] = 't'
    return (u'%s    (%o)' % (''.join(chars), mode))

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

def humanUnixAttributes(mode):