code: def subpacket_prefix_len(item):
      
      n = len(item)
      if n >= 8384:
          prefix = b'\xFF' + struct.pack('>L', n)
      elif n >= 192:
          n = n - 192
          prefix = struct.pack('BB', (n // 256) + 192, n % 256)
      else:
          prefix = struct.pack('B', n)
      return prefix + item
docs: Prefix subpacket length according to RFC 4880 section-5.2.3.1.