def _get_applicable_offers(self, current_protocol, path):

        edges = []

        for from_protocol_name, offers in self._adaptation_offers.items():
            from_protocol = offers[0].from_protocol
            mro_distance = self.mro_distance_to_protocol(
                current_protocol, from_protocol
            )

            if mro_distance is not None:

                for offer in offers:
                    # Avoid cycles by checking that we did not consider this
                    # offer in this path.
                    if offer not in path:
                        edges.append((mro_distance, offer))

        return edges
Find all adaptation offers that can be applied to a protocol.
dataset/ETHPy150Open enthought/traits/traits/adaptation/adaptation_manager.py/AdaptationManager._get_applicable_offers