human
I wrote the below code

    def _encode64(input_, count):
        output = ''
        i = 0
        while (i < count):
            value = ord(input_[i])
            i += 1
            output = (output + ITOA64[(value & 63)])
            if (i < count):
                value = (value | (ord(input_[i]) << 8))
            output = (output + ITOA64[((value >> 6) & 63)])
            i += 1
            if (i >= count):
                break
            if (i < count):
                value = (value | (ord(input_[i]) << 16))
            output = (output + ITOA64[((value >> 12) & 63)])
            i += 1
            if (i >= count):
                break
            output = (output + ITOA64[((value >> 18) & 63)])
        return output
    if isinstance(password, unicode):
        password = password.encode(UNICODE_ENCODING)
    cipher = md5(salt)
    cipher.update(password)
    hash_ = cipher.digest()
    for i in xrange(count):
        _ = md5(hash_)
        _.update(password)
        hash_ = _.digest()
    retVal = (prefix + _encode64(hash_, 16))
    return (retVal.upper() if uppercase else retVal)

What's a good function header?
assistant
#Here is Python code to fix + _encode64(hash_, 16))
.

def wordpress_passwd(password, salt, count, prefix, uppercase=False):