code: def read(data):
      header = struct.unpack("Q", data[:8])
  
      # crc_hdr = struct.unpack('I', data[:4])
  
      event_str = data[12 : 12 + int(header[0])]  # 8+4
      data = data[12 + int(header[0]) + 4 :]
      return data, event_str
  
imports: import struct
  import tensorboard.compat.proto.event_pb2
  import io
  import argparse
label_desc: Use image node_id 1 for calling a global function with example usage: read(data) and returns: data,  event_str