def remove(self, elem):
        """Remove a requirement.

        :param elem: a string or :class:`Requirement` instance.
        """
        if isinstance(elem, text_type):
            for requirement in self:
                if requirement.package == elem:
                    return super(Requirements, self).remove(requirement)
        return super(Requirements, self).remove(elem)
def _swdb_group_upgrade(self, group_id, pkg_types, pkgs):
        if not self._base.history.group.get(group_id):
            self._raise_or_warn( self._ignore_installed, _("Group id '%s' is not installed.") % group_id)
            return

        swdb_group = self._create_swdb_group(group_id, pkg_types, pkgs)

        if swdb_group is not None:
            self._base.history.group.upgrade(swdb_group)