def get_sampler(self, processor_id: str | list[str]) -> cirq.Sampler:
        """Returns a sampler backed by the engine.

        Args:
            processor_id: String identifier, or list of string identifiers,
                determining which processors may be used when sampling.

        Raises:
            ValueError: if multiple processor ids are given.
        """
        if not isinstance(processor_id, str):
            raise ValueError(f'Invalid processor {processor_id}')
        return self._processors[processor_id].get_sampler()
Returns a sampler backed by the engine.

        Args:
            processor_id: String identifier, or list of string identifiers,
                determining which processors may be used when sampling.

        Raises:
            ValueError: if multiple processor ids are given.
        
cirq-google/cirq_google/engine/abstract_local_engine.py