human
Complete the below
def _VarintEncoder():

    ''''Return an encoder for a basic varint value (does not include tag).'
    '''
assistant
#Here is the Python code you requested.
    local_chr = chr
    def EncodeVarint(write, value):
        bits = (value & 127)
        value >>= 7
        while value:
            write(local_chr((128 | bits)))
            bits = (value & 127)
            value >>= 7
        return write(local_chr(bits))
    return EncodeVarint