def set_notifier_icon(self, notifier, icon):
        try:
            from gtk import gdk
        except ImportError:
            # TODO: raise a warning?
            raise RuntimeError('The gtk.gdk module is required to set an icon.')

        if icon is not None:
            if not isinstance(icon, gdk.Pixbuf):
                icon = gdk.pixbuf_new_from_file(icon)
            notifier.set_icon_from_pixbuf(icon)
Used to attach an icon on a notifier object.
dataset/ETHPy150Open getlogbook/logbook/logbook/notifiers.py/LibNotifyHandler.set_notifier_icon