def filter(
        self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None
    ) -> Iterator[UnparsedVersionVar]:
        """
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        """

        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        
product/runtime/src/main/python/pkg_resources/_vendor/packaging/specifiers.py