def test_add_already_added(self):
        prio_set_list = event._PrioritizedSetList()
        obj = object()
        prio_set_list.add(0, obj)

        with pytest.raises(ValueError) as excinfo:
            prio_set_list.add(0, obj)
        excinfo.match(r"has already been added")

        with pytest.raises(ValueError) as excinfo:
            prio_set_list.add(1, obj)
        excinfo.match(r"has already been added")
def ngettext(self, singular: str, plural: str, lang: str = None, n=1):
        """
        Plural translations
        """
        if lang is None:
            lang = self.context_lang.get()

        if lang not in self.translations:
            if n == 1:
                return singular
            return plural

        translator = self.translations[lang]
        return translator.ngettext(singular, plural, n)