code: def test_error_no_trainable_args():
      """Test that an error is raised if none of the arguments is trainable."""
  
      opt = RotosolveOptimizer()
      fun = lambda x, y, z: 1.0
      x = np.arange(4, requires_grad=False)
  
      with pytest.raises(
          ValueError, match="Found no parameters to optimize."
      ):
          opt.step(fun, x, nums_frequency=None, spectra=None)
  
imports: import functools
  import pytest
  from scipy.optimize import shgo
  import pennylane
  from pennylane import numpy
  from pennylane.utils import _flatten, unflatten
  from pennylane.optimize import RotosolveOptimizer
label_desc: Use image node_id 6 for calling a global function with example usage: test_error_no_trainable_args() without return types