class_docstr: Test inputs and pre-processing.
class_docstr_tok: ["Test","inputs","and","pre-processing","."]
docstr: Verifies that exception is raised if the
  number of dimensions of features is incorrect.
docstr_tok: ["Verifies","that","exception","is","raised","if","the","number","of","dimensions","of","features","is","incorrect","."]
code: def test_exception_wrong_dim(self, shape):
      """Verifies that exception is raised if the
      number of dimensions of features is incorrect."""
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev)
      def circuit(weights):
          qml.ArbitraryUnitary(weights, wires=range(2))
          return qml.expval(qml.PauliZ(0))
  
      with pytest.raises(
          ValueError, match="Weights tensor must be of shape"
      ):
          weights = np.zeros(shape)
          circuit(weights)
  
imports: import pytest
  import numpy
  from pennylane import numpy
  import pennylane
  from pennylane.templates.subroutines.arbitrary_unitary import _all_pauli_words_but_identity, _tuple_to_word, _n_k_gray_code
label_desc: Use image node_id 1 for calling the TestInputs obj's underlying member method code with example usage: obj.test_exception_wrong_dim(shape) and returns: qml