def append_varint32(self, value):
        """Appends a signed 32-bit integer to the internal buffer,
        encoded as a varint.  (Note that a negative varint32 will
        always require 10 bytes of space.)
        """
        if not wire_format.INT32_MIN <= value <= wire_format.INT32_MAX:
            raise errors.EncodeError('Value out of range: %d' % value)
        self.append_varint64(value)
Appends a signed 32-bit integer to the internal buffer,
        encoded as a varint.  (Note that a negative varint32 will
        always require 10 bytes of space.)