def next_event(self, event_id, prev=False):
i = self.events.index(self._events_dict[event_id])<EOL>if prev and i > <NUM_LIT:0>:<EOL><INDENT>return self.events[i - <NUM_LIT:1>]<EOL><DEDENT>elif not prev and i + <NUM_LIT:1> < len(self.events):<EOL><INDENT>return self.events[i + <NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Get the event following another event in this conversation.

        Args:
            event_id (str): ID of the event.
            prev (bool): If ``True``, return the previous event rather than the
                next event. Defaults to ``False``.

        Raises:
            KeyError: If no such :class:`.ConversationEvent` is known.

        Returns:
            :class:`.ConversationEvent` or ``None`` if there is no following
            event.