code: def expected(params):
      """Compute the expected VJP for the ansatz above."""
      x, y = 1.0 * params
      return (
          np.array(
              [
                  (np.cos(y / 2) ** 2 * np.sin(x))
                  + (np.cos(y / 2) ** 2 * np.sin(x)),
                  (np.cos(x / 2) ** 2 * np.sin(y))
                  - (np.sin(x / 2) ** 2 * np.sin(y)),
              ]
          )
          / 2
      )
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.gradients import param_shift
label_desc: Use image node_id 2 for calling a global function with example usage: expected(params) and returns: unknown