def get_device(self) -> cirq.Device:
        """Returns a `Device` created from the processor's device specification.

        This method queries the processor to retrieve the device specification,
        which is then use to create a `cirq_google.GridDevice` that will
        validate that operations are supported and use the correct qubits.
        """
        spec = self.get_device_specification()
        if not spec:
            raise ValueError('Processor does not have a device specification')
        return grid_device.GridDevice.from_proto(spec)
Returns a `Device` created from the processor's device specification.

        This method queries the processor to retrieve the device specification,
        which is then use to create a `cirq_google.GridDevice` that will
        validate that operations are supported and use the correct qubits.
        
cirq-google/cirq_google/engine/engine_processor.py