def key_to_qubit(target: METRIC_KEY) -> cirq.GridQubit:
        """Returns a single qubit from a metric key.

        Raises:
           ValueError: If the metric key is a tuple of strings.
        """
        if target and isinstance(target, tuple) and isinstance(target[0], cirq.GridQubit):
            return target[0]
        raise ValueError(f'The metric target {target} was not a tuple of qubits')
Returns a single qubit from a metric key.

        Raises:
           ValueError: If the metric key is a tuple of strings.
        
cirq-google/cirq_google/engine/calibration.py