human
Complete this python program:
def _SignedVarintEncoder():
assistant
#Here is the Python code you requested.

    """Return an encoder for a basic signed varint value (does not include
    tag).
    """
    local_chr = chr
    def EncodeSignedVarint(write, value):
        if (value < 0):
            value += (1 << 64)
        bits = (value & 127)
        value >>= 7
        while value:
            write(local_chr((128 | bits)))
            bits = (value & 127)
            value >>= 7
        return write(local_chr(bits))
    return EncodeSignedVarint