def METHOD_NAME(
    shipping_zone_warehouses, warehouse_to_channel_ids, zone_to_channel_ids
):
    shipping_zone_warehouses_to_delete = []
    for id, zone_id, warehouse_id in shipping_zone_warehouses.values_list(
        "id", "shippingzone_id", "warehouse_id"
    ):
        warehouse_channels = warehouse_to_channel_ids.get(warehouse_id, set())
        zone_channels = zone_to_channel_ids.get(zone_id, set())
        # if there is no common channels between shipping zone and warehouse
        # the relation should be deleted
        if not warehouse_channels.intersection(zone_channels):
            shipping_zone_warehouses_to_delete.append(id)
    return shipping_zone_warehouses_to_delete