def remove(self, *terminals):
        # type: (Iterable[Any]) -> None
        """
        Remove terminals from the set.
        Removes also rules using this terminal.
        :param terminals: Terminals to remove.
        :raise KeyError if the object is not in the set.
        """
        for term in set(terminals):
            if term not in self:
                raise KeyError('Terminal ' + str(term) + ' is not inside')
            self._grammar.rules.remove(*self._assign_map[term], _validate=False)
            del self._assign_map[term]
            super().remove(term)