code: def test_no_batchdim_error():
      """Test that an error is raised when no batch
      dimension is given to the decorated QNode"""
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev)
      def circuit(x, y):
          qml.RX(x, wires=0)
          qml.RY(y[..., 0], wires=0)
          qml.RY(y[..., 1], wires=1)
          return qml.expval(qml.PauliZ(wires=0) @ qml.PauliZ(wires=1))
  
      # the second partial argument
      y = np.random.uniform(size=2)
  
      # the incorrectly batched argument to the new partial circuit
      x = np.random.uniform(size=())
  
      batched_partial_circuit = qml.batch_partial(circuit, y=y)
  
      with pytest.raises(
          ValueError,
          match="Parameter with batch dimension must be provided",
      ):
          batched_partial_circuit(x=x)
  
imports: import re
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 19 for calling a global function with example usage: test_no_batchdim_error() and returns: qml