def _target_errors(
        self, target_error: str
    ) -> Mapping[tuple[cirq.GridQubit, cirq.GridQubit], float]:
        """Returns requested error.

        The requested error must be one of 'pauli', 'decay_constant', or 'xeb'.

        Args:
            target_error: The error to draw.

        Returns:
            A mapping of qubit pairs to the requested error.

        Raises:
            ValueError: If the requested error is not one of 'pauli', 'decay_constant', or 'xeb'.
        """
        error_funcs = {
            'pauli': self.inferred_pauli_error,
            'decay_constant': self.inferred_decay_constant,
            'xeb': self.inferred_xeb_error,
        }
        return error_funcs[target_error]()
Returns requested error.

        The requested error must be one of 'pauli', 'decay_constant', or 'xeb'.

        Args:
            target_error: The error to draw.

        Returns:
            A mapping of qubit pairs to the requested error.

        Raises:
            ValueError: If the requested error is not one of 'pauli', 'decay_constant', or 'xeb'.
        
cirq-core/cirq/experiments/two_qubit_xeb.py