<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _store_entry(self, entry):
 """ Stores a new log entry and notifies listeners :param entry: A LogEntry object """

        # Get the logger and log the message
        self.__logs.append(entry)

        # Notify listeners
        for listener in self.__listeners.copy():
            try:
                listener.logged(entry)
            except Exception as ex:
                # Create a new log entry, without using logging nor notifying
                # listener (to avoid a recursion)
                err_entry = LogEntry(
                    logging.WARNING,
                    "Error notifying logging listener {0}: {1}".format(
                        listener, ex
                    ),
                    sys.exc_info(),
                    self._context.get_bundle(),
                    None,
                )

                # Insert the new entry before the real one
                self.__logs.pop()
                self.__logs.append(err_entry)
                self.__logs.append(entry)