code: def _encode_uvarint(data, n):
      ''' Encodes integer into variable-length format into data.'''
      if n < 0:
          raise ValueError('only support positive integer')
      while True:
          this_byte = n & 0x7f
          n >>= 7
          if n == 0:
              data.append(this_byte)
              break
          data.append(this_byte | 0x80f _encode_uvarint(data, n):
      ''' Encodes integer into variable-length format into data.'''
      if n < 0:
          raise ValueError('only support positive integer')
      while True:
          this_byte = n & 0x7f
          n >>= 7
          if n == 0:
              data.append(this_byte)
              break
          data.append(this_byte | 0x80)
docs: Encodes integer into variable-length format into data.