docstr: Test that the counts function outputs counts of the right size with batching
docstr_tok: ["Test","that","the","counts","function","outputs","counts","of","the","right","size","with","batching"]
code: def test_batched_counts_dimension(self, mocker):
      """Test that the counts function outputs counts of the right size with batching"""
      n_sample = 10
  
      dev = qml.device("default.qubit.legacy", wires=2, shots=n_sample)
      spy = mocker.spy(qml.QubitDevice, "sample")
  
      @qml.qnode(dev)
      def circuit():
          qml.RX([0.54, 0.65], wires=0)
          return qml.counts(qml.PauliZ(0)), qml.counts(qml.PauliX(1))
  
      sample = circuit()
  
      assert isinstance(sample, tuple)
      assert len(sample) == 2
      assert np.all(
          [
              sum(s.values()) == n_sample
              for batch in sample
              for s in batch
          ]
      )
  
      custom_measurement_process(dev, spy)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane.measurements import Counts
  from pennylane.operation import Operator
label_desc: Use image node_id 2 for calling the TestCountsIntegration obj's underlying member method code with example usage: obj.test_batched_counts_dimension(mocker) and returns: qml,  qml