code: def test_all_operations(mocker):
      """Test that a batch dimension can be added to all operations"""
      dev = qml.device("default.qubit", wires=3)
  
      @functools.partial(qml.batch_params, all_operations=True)
      @qml.qnode(dev, interface="autograd")
      def circuit(x, weights):
          qml.RX(x, wires=0)
          qml.RY([0.2, 0.3, 0.3], wires=1)
          qml.templates.StronglyEntanglingLayers(
              weights, wires=[0, 1, 2]
          )
          return qml.probs(wires=[0, 2])
  
      batch_size = 3
      x = np.linspace(0.1, 0.5, batch_size, requires_grad=True)
      weights = np.ones((batch_size, 10, 3, 3), requires_grad=False)
  
      spy = mocker.spy(circuit.device, "execute")
      res = circuit(x, weights)
      assert res.shape == (batch_size, 4)
      assert len(spy.call_args[0][0]) == batch_size
  
imports: import functools
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 12 for calling a global function with example usage: test_all_operations(mocker) and returns: qml