def excluded_of(self, candidate):
        """Build a new instance from this, but excluding specified candidate.

        Returns the new instance, or None if we still have no valid candidates.
        """
        incompats = list(self.incompatibilities)
        incompats.append(candidate)
        candidates = [c for c in self.candidates if c != candidate]
        if not candidates:
            return None
        criterion = type(self)(candidates, list(self.information), incompats)
        return criterion
Build a new instance from this, but excluding specified candidate.

        Returns the new instance, or None if we still have no valid candidates.
        
product/gradle-plugin/src/main/python/pip/_vendor/resolvelib/resolvers.py