def load_median_device_calibration(processor_id: str) -> calibration.Calibration:
    """Loads a median `cirq_google.Calibration` for the given device.

    Real calibration data from Google's 'rainbow' and 'weber' devices has been
    saved in Cirq. The calibrations selected are roughly representative of the
    median performance for that chip.

    A description of the stored metrics can be found on the
    [calibration page](https://quantumai.google/cirq/google/calibration).

    Args:
        processor_id: name of the processor to simulate.
            Use `list_virtual_processors` to obtain available names.

    Raises:
        ValueError: if processor_id is not a supported QCS processor.
    """
    cal_name = MEDIAN_CALIBRATIONS.get(processor_id, None)
    if cal_name is None:
        raise ValueError(
            f"Got processor_id={processor_id}, but no median calibration "
            "is defined for that processor."
        )
    path = pathlib.Path(__file__).parent.parent.resolve()
    with path.joinpath('devices', 'calibrations', cal_name).open() as f:
        cal = cast(calibration.Calibration, cirq.read_json(f))
    cal.timestamp = MEDIAN_CALIBRATION_TIMESTAMPS[processor_id]
    return cal
Loads a median `cirq_google.Calibration` for the given device.

    Real calibration data from Google's 'rainbow' and 'weber' devices has been
    saved in Cirq. The calibrations selected are roughly representative of the
    median performance for that chip.

    A description of the stored metrics can be found on the
    [calibration page](https://quantumai.google/cirq/google/calibration).

    Args:
        processor_id: name of the processor to simulate.
            Use `list_virtual_processors` to obtain available names.

    Raises:
        ValueError: if processor_id is not a supported QCS processor.
    
cirq-google/cirq_google/engine/virtual_engine_factory.py