code: def retry_untill_timeout(cb_fn, *args, timeout=4, **kwargs):
      """
      certain operations in metaflow may not be synchronous and may be running fully asynchronously.
      This creates a problem in writing tests that verify some behaviour at runtime. This function
      is a helper that allows us to wait for a certain amount of time for a callback function to
      return a non-False value.
      """
      import time
  
      start = time.time()
      while True:
          cb_val = cb_fn(*args, **kwargs)
          if cb_val is not False:
              return cb_val
          if time.time() - start > timeout:
              raise TimeoutError(
                  "Timeout waiting for callback to return non-False value"
              )
          time.sleep(1)
  
imports: import sys
  import os
  from metaflow.exception import MetaflowException
  from metaflow import current
  from metaflow.cards import get_cards
  from metaflow.plugins.cards.exception import CardNotPresentException
label_desc: Use image node_id 4 for calling a global function with example usage: retry_untill_timeout(cb_fn) and returns: cb_val