class_docstr: Test template inputs and pre-processing (ensure the correct exceptions are thrown for the inputs)
class_docstr_tok: ["Test","template","inputs","and","pre-processing","(","ensure","the","correct","exceptions","are","thrown","for","the","inputs",")"]
docstr: Verifies that an exception is raised if the weights shape is incorrect.
docstr_tok: ["Verifies","that","an","exception","is","raised","if","the","weights","shape","is","incorrect","."]
code: def test_exception_wrong_weight_shape(
      self,
      block,
      n_params_block,
      wires,
      n_block_wires,
      block_weights,
      msg_match,
  ):
      """Verifies that an exception is raised if the weights shape is incorrect."""
      with pytest.raises(ValueError, match=msg_match):
          TTN(
              wires, n_block_wires, block, n_params_block, block_weights
          )
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.templates.tensornetworks.ttn import compute_indices, TTN
label_desc: Use image node_id 3 for calling the TestTemplateInputs obj's underlying member method code with example usage: obj.test_exception_wrong_weight_shape(block, n_params_block, wires, n_block_wires, block_weights, msg_match) without return types