def _brute_force_strategy(
        cls,
        mm: mapping_manager.MappingManager,
        two_qubit_ops_ints: Sequence[Sequence[QidIntPair]],
        timestep: int,
    ) -> tuple[QidIntPair, ...]:
        """Inserts SWAPS along the shortest path of the qubits that are the farthest.

        Since swaps along the shortest path are being executed one after the other, in order
        to achieve the physical swaps (M[q1], M[q2]), (M[q2], M[q3]), ..., (M[q_{i-1}], M[q_i]),
        we must execute the logical swaps (q1, q2), (q1, q3), ..., (q_1, qi).
        """
        furthest_op = max(two_qubit_ops_ints[timestep], key=lambda op: mm.dist_on_device(*op))
        path = mm.shortest_path(*furthest_op)
        return tuple([(path[0], path[i + 1]) for i in range(len(path) - 2)])
Inserts SWAPS along the shortest path of the qubits that are the farthest.

        Since swaps along the shortest path are being executed one after the other, in order
        to achieve the physical swaps (M[q1], M[q2]), (M[q2], M[q3]), ..., (M[q_{i-1}], M[q_i]),
        we must execute the logical swaps (q1, q2), (q1, q3), ..., (q_1, qi).
        
cirq-core/cirq/transformers/routing/route_circuit_cqc.py