code: def leb128_encode(value):
          
          if value == 0:
              return b'\x00'
  
          result = []
          while value != 0:
              byte = value & 0x7f
              value >>= 7
              if value != 0:
                  byte |= 0x80
              result.append(byte)
  
          return bytes(result)
docs: Encodes an integer using LEB128.
  
          :param int value: The value to encode.
          :return: The LEB128-encoded integer.
          :rtype: bytes