<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def interruptible_sleep(t, event=None):
 """ Sleeps for a specified duration, optionally stopping early for event. Returns True if interrupted """

    log.info("sleeping %s", t)

    if event is None:
        time.sleep(t)
        return False
    else:
        return not event.wait(t)