def merged_with(self, provider, requirement, parent):
        """Build a new instance from this and a new requirement.
        """
        infos = list(self.information)
        infos.append(RequirementInformation(requirement, parent))
        candidates = [
            c
            for c in self.candidates
            if provider.is_satisfied_by(requirement, c)
        ]
        criterion = type(self)(candidates, infos, list(self.incompatibilities))
        if not candidates:
            raise RequirementsConflicted(criterion)
        return criterion
Build a new instance from this and a new requirement.
        
product/gradle-plugin/src/main/python/pip/_vendor/resolvelib/resolvers.py