code: def interruptible_sleep(t, event=None):
      
      log.info("sleeping %s", t)
  
      if event is None:
          time.sleep(t)
          return False
      else:
          return not event.wait(t)
docs: Sleeps for a specified duration, optionally stopping early for event.
  
      Returns True if interrupted