code: def test_lambda_evaluation():
      """Test lambda argument replacement matches individual full evaluations"""
      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 first partial argument
      x = np.random.uniform(size=())
  
      # the base value of the second partial argument
      y = np.random.uniform(size=2)
  
      # the second partial argument as a function of the inputs
      fn = lambda y0: y + y0 * np.ones(2)
  
      # values for the second argument
      y0 = np.random.uniform(size=batch_size)
  
      batched_partial_circuit = qml.batch_partial(
          circuit, x=x, preprocess={"y": fn}
      )
      res = batched_partial_circuit(y0)
  
      # check the results against individually executed circuits
      indiv_res = []
      for y0_indiv in y0:
          indiv_res.append(circuit(x, y + y0_indiv * np.ones(2)))
  
      assert np.allclose(res, indiv_res)
  
imports: import re
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 11 for calling a global function with example usage: test_lambda_evaluation() and returns: qml