def __init__(
        self,
        *,
        processor: cg.engine.AbstractProcessor,
        run_name: str = "",
        snapshot_id: str = "",
        device_config_name: str = "",
        max_concurrent_jobs: int = 10,
    ):
        """Inits ProcessorSampler.

        Either both (`run_name` or `snapshot_id`) and `device_config_name` must be set, or neither
        of them must be set. If none of them are set, a default internal device configuration
        will be used.

        Args:
            processor: AbstractProcessor instance to use.
            run_name: A unique identifier representing an automation run for the
                specified processor. An Automation Run contains a collection of
                device configurations for a processor.
            snapshot_id: A unique identifier for an immutable snapshot reference.
            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.
            max_concurrent_jobs: The maximum number of jobs to be sent
                concurrently to the Engine. This client-side throttle can be
                used to proactively reduce load to the backends and avoid quota
                violations when pipelining circuit executions.

        Raises:
            ValueError: If  only one of `run_name` and `device_config_name` are specified.
        """
        if (bool(run_name) or bool(snapshot_id)) ^ bool(device_config_name):
            raise ValueError('Cannot specify only one of `run_name` and `device_config_name`')

        self._processor = processor
        self._run_name = run_name
        self._snapshot_id = snapshot_id
        self._device_config_name = device_config_name
        self._concurrent_job_limiter = duet.Limiter(max_concurrent_jobs)
Inits ProcessorSampler.

        Either both (`run_name` or `snapshot_id`) and `device_config_name` must be set, or neither
        of them must be set. If none of them are set, a default internal device configuration
        will be used.

        Args:
            processor: AbstractProcessor instance to use.
            run_name: A unique identifier representing an automation run for the
                specified processor. An Automation Run contains a collection of
                device configurations for a processor.
            snapshot_id: A unique identifier for an immutable snapshot reference.
            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.
            max_concurrent_jobs: The maximum number of jobs to be sent
                concurrently to the Engine. This client-side throttle can be
                used to proactively reduce load to the backends and avoid quota
                violations when pipelining circuit executions.

        Raises:
            ValueError: If  only one of `run_name` and `device_config_name` are specified.
        
cirq-google/cirq_google/engine/processor_sampler.py