code: def test_qubit_rotation(circuit):
      """Test that step function returns correct results for a qubit rotation circuit."""
  
      pool = [
          qml.RX(np.array([1.0]), wires=0),
          qml.RZ(np.array([1.0]), wires=0),
      ]
      opt = qml.AdaptiveOptimizer(param_steps=20)
      circuit = opt.step(circuit, pool, params_zero=False)
      expval = circuit()
  
      #  rotation around X with np.pi gives expval(Z) = -1
      assert np.allclose(expval, -1)
      assert qml.equal(
          circuit.tape.operations[-1],
          qml.RX(np.array([np.pi]), wires=0),
      )
  
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 9 for calling a global function with example usage: test_qubit_rotation(circuit) without return types