code: def _run(
          self,
          circuit: circuits.Circuit,
          param_resolver: study.ParamResolver,
          repetitions: int) -> Dict[str, List[np.ndarray]]:
          
          param_resolver = param_resolver or study.ParamResolver({})
          resolved_circuit = protocols.resolve_parameters(circuit, param_resolver)
          def measure_or_mixture(op):
              return protocols.is_measurement(op) or protocols.has_mixture(op)
          if circuit.are_all_matches_terminal(measure_or_mixture):
              return self._run_sweep_sample(resolved_circuit, repetitions)
          else:
              return self._run_sweep_repeat(resolved_circuit, repetitions)
docs: See definition in `cirq.SimulatesSamples`.