def METHOD_NAME(self, menu, library, browser, playlists):
    """Appends items onto `menu` for each enabled playlist plugin,
    separated as necessary. """
    attrs = ['plugin_playlist', 'plugin_playlists']
    if len(playlists) == 1:
        attrs.append('plugin_single_playlist')
    items = []
    kinds = self.__plugins
    kinds.sort(key=lambda plugin: plugin.PLUGIN_ID)
    print_d("Found %d Playlist plugin(s): %s" % (len(kinds), kinds))
    for Kind in kinds:
        usable = any([callable(getattr(Kind, s)) for s in attrs])
        if usable:
            try:
                items.append(Kind(playlists=playlists, library=library))
            except:
                print_e("Couldn't initialise playlist plugin %s: " % Kind)
                print_exc()
    items = [i for i in items if i.initialized]
    if items:
        menu.append(SeparatorMenuItem())
        for item in items:
            try:
                menu.append(item)
                args = (library, browser, playlists)
                if item.get_submenu():
                    for subitem in item.get_submenu().get_children():
                        subitem.connect(
                            'activate', self.__on_activate, item, *args)
                else:
                    item.connect(
                        'activate', self.__on_activate, item, *args)
            except:
                print_exc()
                item.destroy()