code: def test_finite_shots_adjoint():
      """Test that shots and adjoint diff raises an error."""
  
      dev = qml.device("lightning.qubit", wires=2, shots=2)
  
      def circuit():
          """Simple quantum function."""
          return qml.expval(qml.PauliZ(0))
  
      with pytest.warns(
          UserWarning,
          match="Requested adjoint differentiation to be computed with finite shots. Adjoint differentiation always "
          "calculated exactly.",
      ):
          qml.QNode(circuit, dev, diff_method="adjoint")
  
file_path: pennylane/tests/devices/test_lightning_qubit.py
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_finite_shots_adjoint() and returns: qml