def _from_json_dict_(cls, metrics: str, **kwargs) -> Calibration:
        """Magic method for the JSON serialization protocol."""
        metric_proto = v2.metrics_pb2.MetricsSnapshot()
        return cls(json_format.ParseDict(metrics, metric_proto))
Magic method for the JSON serialization protocol.
cirq-google/cirq_google/engine/calibration.py