class_docstr: Test the helper function choose_trainable_params.
class_docstr_tok: ["Test","the","helper","function","choose_trainable_params","."]
docstr: Test that the method raises a warning when an empty iterable
  is passed as ``argnum``.
docstr_tok: ["Test","that","the","method","raises","a","warning","when","an","empty","iterable","is","passed","as","``","argnum","``","."]
code: def test_warning_with_empty_argnum(self):
      """Test that the method raises a warning when an empty iterable
      is passed as ``argnum``."""
      tape = qml.tape.QuantumScript(
          [
              qml.RX(1.2, wires=0),
              qml.RY(2.3, wires=0),
              qml.RZ(3.4, wires=0),
          ],
          [qml.expval(qml.PauliZ(0))],
          trainable_params=[1, 2],
      )
      with pytest.warns(
          UserWarning, match="No trainable parameters were specified"
      ):
          chosen = choose_trainable_params(tape, [])
      assert chosen == []
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.gradients.gradient_transform import _find_gradient_methods, _validate_gradient_methods, choose_trainable_params
label_desc: Use image node_id 3 for calling the TestChooseParams obj's underlying member method code with example usage: obj.test_warning_with_empty_argnum() without return types