code: def wait_func_is_true(func, timeout, *args, **kwargs):
      start_time = time.time()
  
      result = func(*args, **kwargs)
      while result is False and (time.time() - start_time) < timeout:
          time.sleep(2)
          result = func(*args, **kwargs)
  
      return result
  
file_path: mindsdb/tests/integration_tests/flows/ps.py
imports: import sys
  import time
  from collections import namedtuple
  import psutil
label_desc: Use image node_id 3 for calling a global function with example usage: wait_func_is_true(func, timeout) and returns: result