def compare_groups(self, groups: Iterable[str]) -> list[str]:
        """Compare the given groups with the lockfile groups and return the groups that are not in the lockfile."""
        if not self.groups:
            return []
        return list(set(groups).difference(self.groups))
Compare the given groups with the lockfile groups and return the groups that are not in the lockfile.
src/pdm/project/lockfile/base.py