code: def test_kwargs_callable_error():
      """Test that an error is raised when keyword arguments
      are provided to a callable wrapper"""
      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))
  
      batch_size = 4
  
      # the partial arguments
      x = np.random.uniform(size=())
  
      y = np.random.uniform(size=2)
      fn = lambda y0: y + y0 * np.ones(2)
      y0 = np.random.uniform(size=batch_size)
  
      batched_partial_circuit = qml.batch_partial(
          circuit, x=x, preprocess={"y": fn}
      )
  
      with pytest.raises(
          ValueError,
          match="Arguments must not be passed as keyword arguments to callable within partial function",
      ):
          batched_partial_circuit(y=y0)
  
      with pytest.raises(
          ValueError,
          match="Arguments must not be passed as keyword arguments to callable within partial function",
      ):
          batched_partial_circuit(y0=y0)
  
imports: import re
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 18 for calling a global function with example usage: test_kwargs_callable_error() and returns: qml