code: def test_riemannian_gradient_nqubits_check():
      """Test that we warn if the system is too big."""
  
      @qml.qnode(qml.device("default.qubit", wires=5))
      def circuit():
          qml.RY(0.5, wires=0)
          return qml.expval(
              qml.Hamiltonian(
                  coeffs=[-1.0], observables=[qml.PauliX(0)]
              )
          )
  
      with pytest.warns(
          UserWarning,
          match="The exact Riemannian gradient is exponentially",
      ):
          RiemannianGradientOptimizer(circuit=circuit, stepsize=0.001)
  
file_path: pennylane/tests/optimize/test_riemannian_gradient_optimizer.py
imports: import pytest
  from scipy.sparse.linalg import expm
  import numpy
  import pennylane
  from pennylane.optimize import RiemannianGradientOptimizer
label_desc: Use image node_id 11 for calling a global function with example usage: test_riemannian_gradient_nqubits_check() and returns: qml