human
I wrote the below code

    local_ord = ord
    def DecodeVarint(buffer, pos):
        result = 0
        shift = 0
        while 1:
            b = local_ord(buffer[pos])
            result |= ((b & 127) << shift)
            pos += 1
            if (not (b & 128)):
                result &= mask
                return (result, pos)
            shift += 7
            if (shift >= 64):
                raise _DecodeError('Too    many    bytes    when    decoding    varint.')
    return DecodeVarint

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

def _VarintDecoder(mask):