code: def lenencInt(self, value):
      byte_count = int(math.ceil(math.log((value + 1), 2) / 8))
      if byte_count == 0:
          return b"\0"
      if value < NULL_VALUE[0]:
          return struct.pack("i", value)[:1]
      if value >= NULL_VALUE[0] and byte_count <= 2:
          return TWO_BYTE_ENC + struct.pack("i", value)[:2]
      if byte_count <= 3:
          return THREE_BYTE_ENC + struct.pack("i", value)[:3]
      if byte_count <= 8:
          return THREE_BYTE_ENC + struct.pack("Q", value)[:8]
  
file_path: mindsdb/mindsdb/api/mysql/mysql_proxy/data_types/mysql_datum.py
imports: import math
  import struct
  from mindsdb.api.mysql.mysql_proxy.libs.constants.mysql import DEFAULT_CAPABILITIES, NULL_VALUE, ONE_BYTE_ENC, THREE_BYTE_ENC, TWO_BYTE_ENC
  from mindsdb.utilities import log
label_desc: Use image node_id 4 for calling the Datum obj's underlying member method code with example usage: obj.lenencInt(value) and returns: bytes, struct, unknown, unknown, unknown