code: def iter_tf_events(dir, path_filter=None):
      from tensorboard.backend.event_processing import directory_watcher
      from tensorboard.backend.event_processing import event_file_loader
  
      with warnings.catch_warnings():
          warnings.simplefilter("ignore", Warning)
          return directory_watcher.DirectoryWatcher(
              dir,
              event_file_loader.LegacyEventFileLoader,
              _summary_events_file_filter(path_filter),
          ).Load()
  
imports: import logging
  import os
  import socket
  import time
  import warnings
  from guild import util
label_desc: Use image node_id 11 for calling a global function with example usage: iter_tf_events(dir, path_filter) and returns: directory_watcher