def METHOD_NAME(self, pkgset):
    if len(pkgset) == 1:
        return
    # algo is roughly thus; spot stable versions, hunt for subset
    # keyworded pkgs that are less then the max version;
    # repeats this for every overshadowing detected
    # finally, does version comparison down slot lines
    stack = []
    bad = []
    for pkg in reversed(pkgset):
        # reduce false positives for idiot keywords/ebuilds
        if pkg.live:
            continue
        curr_set = {x for x in pkg.keywords if not x.startswith("-")}
        if not curr_set:
            continue
        matches = [
            ver for ver, keys in stack if ver.slot == pkg.slot and not curr_set.difference(keys)
        ]
        # we've done our checks; now we inject unstable for any stable
        # via this, earlier versions that are unstable only get flagged
        # as "not needed" since their unstable flag is a subset of the
        # stable.
        # also, yes, have to use list comp here- we're adding as we go
        curr_set.update([f"~{x}" for x in curr_set if not x.startswith("~")])
        stack.append((pkg, curr_set))
        if matches:
            bad.append((pkg, matches))
    visible_cache = defaultdictkey(lambda profile_pkg: profile_pkg[0].visible(profile_pkg[1]))
    for pkg, matches in reversed(bad):
        if self.options.stable_only and all(
            key.startswith("~") for x in matches for key in x.keywords
        ):
            continue
        if matches := self.filter_later_profiles_masks(visible_cache, pkg, matches):
            later_versions = (x.fullver for x in sorted(matches))
            yield RedundantVersion(pkg.slot, later_versions, pkg=pkg)