class_docstr: Test inputs and pre-processing.
class_docstr_tok: ["Test","inputs","and","pre-processing","."]
docstr: Check exception if wrong dimension of weights
docstr_tok: ["Check","exception","if","wrong","dimension","of","weights"]
code: def test_cvqnn_layers_exception_second_dim(self):
      """Check exception if wrong dimension of weights"""
      shapes = expected_shapes(1, 2)
      weights = [np.random.random(shape) for shape in shapes[:-1]]
      weights += [np.random.random((1, shapes[-1][1] - 1))]
  
      dev = DummyDevice(wires=2)
  
      @qml.qnode(dev)
      def circuit():
          qml.CVNeuralNetLayers(*weights, wires=range(2))
          return qml.expval(qml.QuadX(0))
  
      with pytest.raises(
          ValueError,
          match="Got unexpected shape for one or more parameters",
      ):
          circuit()
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.devices import DefaultGaussian
label_desc: Use image node_id 2 for calling the TestInputs obj's underlying member method code with example usage: obj.test_cvqnn_layers_exception_second_dim() and returns: qml