def __getitem__(self, position):
        """Return widget at position or raise IndexError."""
        if position == self.POSITION_LOADING:
            if self._first_loaded:
                # TODO: Show the full date the conversation was created.
                return urwid.Text('No more messages', align='center')
            else:
                # Don't try to load while we're already loading.
                if not self._is_loading and not self._first_loaded:
                    self._is_loading = True
                    self._coroutine_queue.put(self._load())
                return urwid.Text('Loading...', align='center')
        try:
            # When creating the widget, also pass the previous event so a
            # timestamp can be shown if this event occurred on a different day.
            # Get the previous event, or None if it isn't loaded or doesn't
            # exist.
            prev_position = self._get_position(position, prev=True)
            if prev_position == self.POSITION_LOADING:
                prev_event = None
            else:
                prev_event = self._conversation.get_event(prev_position)

            return MessageWidget.from_conversation_event(
                self._conversation, self._conversation.get_event(position),
                prev_event, self._datetimefmt,
                watermark_users=self._watermarked_events.get(position, None)
            )
        except KeyError:
            raise IndexError('Invalid position: {}'.format(position))
Return widget at position or raise IndexError.
hangups/ui/__main__.py