def get_sampler(
        self,
        processor_id: str | list[str],
        run_name: str = "",
        device_config_name: str = "",
        snapshot_id: str = "",
    ) -> cirq_google.ProcessorSampler:
        """Returns a sampler backed by the engine.

        Args:
            processor_id: String identifier of which processor should be used to sample.
            run_name: A unique identifier representing an automation run for the
                processor. An Automation Run contains a collection of device
                configurations for the processor.
            device_config_name: An identifier used to select the processor configuration
                utilized to run the job. A configuration identifies the set of
                available qubits, couplers, and supported gates in the processor.
            snapshot_id: A unique identifier for an immutable snapshot reference. A
                snapshot contains a collection of device configurations for the processor.

        Returns:
            A `cirq.Sampler` instance (specifically a `engine_sampler.ProcessorSampler`
            that will send circuits to the Quantum Computing Service
            when sampled.

        Raises:
            ValueError: if a list of processors is provided.  This is no longer supported.
        """
        if not isinstance(processor_id, str):
            raise ValueError(
                f'Passing a list of processors ({processor_id}) '
                'to get_sampler() no longer supported. Use Engine.run() instead if '
                'you need to specify a list.'
            )
        return self.get_processor(processor_id).get_sampler(
            run_name=run_name, device_config_name=device_config_name, snapshot_id=snapshot_id
        )
Returns a sampler backed by the engine.

        Args:
            processor_id: String identifier of which processor should be used to sample.
            run_name: A unique identifier representing an automation run for the
                processor. An Automation Run contains a collection of device
                configurations for the processor.
            device_config_name: An identifier used to select the processor configuration
                utilized to run the job. A configuration identifies the set of
                available qubits, couplers, and supported gates in the processor.
            snapshot_id: A unique identifier for an immutable snapshot reference. A
                snapshot contains a collection of device configurations for the processor.

        Returns:
            A `cirq.Sampler` instance (specifically a `engine_sampler.ProcessorSampler`
            that will send circuits to the Quantum Computing Service
            when sampled.

        Raises:
            ValueError: if a list of processors is provided.  This is no longer supported.
        
cirq-google/cirq_google/engine/engine.py