code: def WaitForFilePath(path_pattern, timeout_sec):
      start = time.time()
      result = []
      while not result:
          if time.time() - start > timeout_sec:
              return result
          result = glob.glob(path_pattern)
          time.sleep(0.1)
      return result
  
file_path: agents/docs/tutorials/colab_kernel_init.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import glob
  import logging
  import os
  import time
label_desc: Use image node_id 1 for calling a global function with example usage: WaitForFilePath(path_pattern, timeout_sec) and returns: result, result