code: def _wait_for_running(state):
      if state.wait_for_running_cb:
          try:
              state.wait_for_running_cb(state)
          except KeyboardInterrupt:
              pass
          except Exception:
              log.exception(
                  "error waiting for runs via %r",
                  state.wait_for_running_cb,
              )
  
imports: import logging
  import os
  import signal
  import time
  from guild import lock
  from guild import op_util
  from guild import util
  from guild import var
label_desc: Use image node_id 28 for calling a global function with example usage: _wait_for_running(state) without return types