<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _fire_ipopo_event(self, kind, factory_name, instance_name=None):
 # type: (int, str, Optional[str]) -> None """ Triggers an iPOPO event :param kind: Kind of event :param factory_name: Name of the factory associated to the event :param instance_name: Name of the component instance associated to the event """

        with self.__listeners_lock:
            # Use a copy of the list of listeners
            listeners = self.__listeners[:]

        for listener in listeners:
            try:
                listener.handle_ipopo_event(
                    constants.IPopoEvent(kind, factory_name, instance_name)
                )
            except:
                _logger.exception("Error calling an iPOPO event handler")