def update(self, down_reqs, output, own_ref, down_ref):

        assert isinstance(down_reqs, Requirements)
        assert isinstance(own_ref, ConanFileReference) if own_ref else True
        assert isinstance(down_ref, ConanFileReference) if down_ref else True

        new_reqs = down_reqs.copy()
        if own_ref:
            new_reqs.pop(own_ref.name, None)
        for name, req in self.items():
            if name in down_reqs:
                other_req = down_reqs[name]
                # update dependency
                other_ref = other_req.conan_reference
                if other_ref and other_ref != req.conan_reference:
                    output.info("%s requirement %s overriden by %s to %s "
                                % (own_ref, req.conan_reference, down_ref or "your conanfile",
                                   other_ref))
                    req.conan_reference = other_ref

            new_reqs[name] = req
        return new_reqs
Compute actual requirement values when downstream values are defined
dataset/ETHPy150Open conan-io/conan/conans/model/requires.py/Requirements.update