def insort_event_right(self, event, lo=<NUM_LIT:0>, hi=None):
if lo < <NUM_LIT:0>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if hi is None:<EOL><INDENT>hi = len(self.queue)<EOL><DEDENT>while lo < hi:<EOL><INDENT>mid = (lo + hi) // <NUM_LIT:2><EOL>if event[<NUM_LIT:0>] < self.queue[mid][<NUM_LIT:0>]:<EOL><INDENT>hi = mid<EOL><DEDENT>else:<EOL><INDENT>lo = mid + <NUM_LIT:1><EOL><DEDENT><DEDENT>self.queue.insert(lo, event)<EOL>
Insert event in queue, and keep it sorted assuming queue is sorted.

        If event is already in queue, insert it to the right of the rightmost
        event (to keep FIFO order).

        Optional args lo (default 0) and hi (default len(a)) bound the
        slice of a to be searched.

        Args:
          event: a (time in sec since unix epoch, callback, args, kwds) tuple.