class_docstr: Tests for the finite difference gradient transform
class_docstr_tok: ["Tests","for","the","finite","difference","gradient","transform"]
docstr: Test that an independent parameter is skipped
  during the Jacobian computation.
code: def test_independent_parameter(self, mocker):
      """Test that an independent parameter is skipped
      during the Jacobian computation."""
      spy = mocker.spy(
          qml.gradients.finite_difference, "generate_shifted_tapes"
      )
  
      with qml.queuing.AnnotatedQueue() as q:
          qml.RX(0.543, wires=[0])
          qml.RY(-0.654, wires=[1])
          qml.expval(qml.PauliZ(0))
  
      tape = qml.tape.QuantumScript.from_queue(q)
      dev = qml.device("default.qubit", wires=2)
      tapes, fn = finite_diff(tape)
      res = fn(dev.execute(tapes))
  
      assert isinstance(res, tuple)
      assert len(res) == 2
  
      assert isinstance(res[0], numpy.ndarray)
      assert isinstance(res[1], numpy.ndarray)
  
      assert len(spy.call_args_list) == 1
  
      # only called for parameter 0
      assert spy.call_args[0][0:2] == (tape, 0)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices import DefaultQubitLegacy
  from pennylane.gradients import finite_diff, finite_diff_coeffs
  from pennylane.operation import AnyWires, Observable
label_desc: Use image node_id 3 for calling the TestFiniteDiff obj's underlying member method code with example usage: obj.test_independent_parameter(mocker) without return types