code: def tail(conn, stack_name, log_func=_tail_print, sleep_time=5,
           include_initial=True):
      
      # First dump the full list of events in chronological order and keep
      # track of the events we've seen already
      seen = set()
      initial_events = get_events(conn, stack_name)
      for e in initial_events:
          if include_initial:
              log_func(e)
          seen.add(e.event_id)
  
      # Now keep looping through and dump the new events
      while 1:
          events = get_events(conn, stack_name)
          for e in events:
              if e.event_id not in seen:
                  log_func(e)
                  seen.add(e.event_id)
          time.sleep(sleep_time)
docs: Show and then tail the event log