code: def test_hyperparameters():
      """Test that the hyperparmaeters are set as expected."""
      weights = np.array([[0.1, -2.1, 1.4]])
      op = qml.RandomLayers(weights, wires=(0, 1))
  
      assert op.hyperparameters == {
          "ratio_imprim": 0.3,
          "imprimitive": qml.CNOT,
          "rotations": (qml.RX, qml.RY, qml.RZ),
          "seed": 42,
      }
  
      op2 = qml.RandomLayers(
          weights,
          wires=(0, 1),
          ratio_imprim=1.0,
          imprimitive=qml.CZ,
          rotations=(qml.RX,),
          seed=None,
      )
  
      assert op2.hyperparameters == {
          "ratio_imprim": 1.0,
          "imprimitive": qml.CZ,
          "rotations": (qml.RX,),
          "seed": None,
      }
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: test_hyperparameters() without return types