code: def test_broadcasting(device):
      """Test that the fidelity transform supports broadcasting"""
      dev = qml.device(device, wires=2)
  
      @qml.qnode(dev)
      def circuit_state(x):
          qml.IsingXX(x, wires=[0, 1])
          return qml.state()
  
      x = np.array([0.4, 0.6, 0.8])
      y = np.array([0.6, 0.8, 1.0])
      fid = qml.qinfo.fidelity(
          circuit_state, circuit_state, wires0=[0], wires1=[1]
      )(x, y)
  
      expected = 0.5 * (
          np.sin(x) * np.sin(y) + np.cos(x) * np.cos(y) + 1
      )
      assert qml.math.allclose(fid, expected)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: test_broadcasting(device) and returns: qml