code: def event_reader(fileobj):
      from tensorflow.core.util import event_pb2
  
      if isinstance(fileobj, str):
          fileobj = open(fileobj, "rb")
  
      header_len = 12
      footer_len = 4
      size_len = 8
  
      while True:
          try:
              data_len = struct.unpack("Q", fileobj.read(size_len))[0]
              fileobj.read(header_len - size_len)
  
              data = fileobj.read(data_len)
  
              event = None
              event = event_pb2.Event()
              event.ParseFromString(data)
  
              fileobj.read(footer_len)
              yield event
          except BaseException:
              check_for_kb_interrupt()
              break
  
      fileobj.close()
  
imports: import hashlib
  from io import StringIO
  from datetime import timedelta
  import re
  import random
  import string
  import struct
  import time
  import sys
  import shutil
  import subprocess
  import os
  import numpy
  import requests
  import tempfile
  import uuid
  from studio.storage import storage_setup
  from studio.storage.storage_type import StorageType
label_desc: Use image node_id 1 for calling a global function with example usage: event_reader(fileobj) without return types