code: def Wait(self, timeout):
      
      time.sleep(timeout - int(timeout))
  
      # Split a long sleep interval into 1 second intervals so we can heartbeat.
      for _ in range(int(timeout)):
        time.sleep(1)
  
        if self.heart_beat_cb:
          self.heart_beat_cb()
docs: Wait for the specified timeout.