def __init__(
        self,
        mapping: dict[cirq.NamedTopology, dict[Any, cirq.Qid]],
        topo_node_to_qubit_func: Callable[[Hashable], cirq.Qid] = default_topo_node_to_qubit,
    ):
        """A placement strategy that uses the explicitly provided `mapping`.

        Args:
            mapping: The hardcoded placements. This provides a placement for each supported
                `cirq.NamedTopology`. The topology serves as the key for the mapping dictionary.
                Each placement is a dictionary mapping topology node to final `cirq.Qid` device
                qubit.
            topo_node_to_qubit_func: A function that maps from `cirq.NamedTopology` nodes
                to `cirq.Qid`. There is a correspondence between nodes and the "abstract" Qids
                used to construct the un-placed circuit. We use this function to interpret
                the provided mappings. By default: nodes which are tuples correspond
                to `cirq.GridQubit`s; otherwise `cirq.LineQubit`.

        Note:
            The attribute `topo_node_to_qubit_func` is not preserved in JSON serialization. This
            bit of plumbing does not affect the placement behavior.
        """
        self._mapping = mapping
        self.topo_node_to_qubit_func = topo_node_to_qubit_func
A placement strategy that uses the explicitly provided `mapping`.

        Args:
            mapping: The hardcoded placements. This provides a placement for each supported
                `cirq.NamedTopology`. The topology serves as the key for the mapping dictionary.
                Each placement is a dictionary mapping topology node to final `cirq.Qid` device
                qubit.
            topo_node_to_qubit_func: A function that maps from `cirq.NamedTopology` nodes
                to `cirq.Qid`. There is a correspondence between nodes and the "abstract" Qids
                used to construct the un-placed circuit. We use this function to interpret
                the provided mappings. By default: nodes which are tuples correspond
                to `cirq.GridQubit`s; otherwise `cirq.LineQubit`.

        Note:
            The attribute `topo_node_to_qubit_func` is not preserved in JSON serialization. This
            bit of plumbing does not affect the placement behavior.
        
cirq-google/cirq_google/workflow/qubit_placement.py