code: def test_circuit_args(interface, diff_method):
      """Test that step_and_cost function uses the correct arguments of the initial circuit."""
  
      @qml.qnode(dev, interface=interface, diff_method=diff_method)
      def circuit():
          qml.BasisState(np.array([1, 1, 0, 0]), wires=range(4))
          return qml.expval(qml.PauliZ(0))
  
      opt = qml.AdaptiveOptimizer()
      circuit, _, _ = opt.step_and_cost(circuit, pool_exc)
  
      assert circuit.interface == interface
      assert circuit.diff_method == diff_method
  
file_path: pennylane/tests/optimize/test_adaptive.py
imports: import copy
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 10 for calling a global function with example usage: test_circuit_args(interface, diff_method) and returns: qml