code: def _sync_state_for_blocking(blocking, state):
      waiting_count_before_sync = len(state.waiting)
      state.waiting.intersection_update(_run_ids(blocking))
      if state.waiting:
          log.debug("waiting on: %s", state.waiting)
      if waiting_count_before_sync and not state.waiting:
          state.logged_waiting = False
  
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 13 for calling a global function with example usage: _sync_state_for_blocking(blocking, state) without return types