class_docstr: Unit tests for the pennylane.qnn.torch.TorchLayer class.
class_docstr_tok: ["Unit","tests","for","the","pennylane.qnn.torch.TorchLayer","class","."]
docstr: Test if a ValueError is raised when instantiated with a weight_shapes dictionary that
  contains the shape of the input argument given by the input_arg class attribute of
  TorchLayer
docstr_tok: ["Test","if","a","ValueError","is","raised","when","instantiated","with","a","weight_shapes","dictionary","that","contains","the","shape","of","the","input","argument","given","by","the","input_arg","class","attribute","of","TorchLayer"]
code: def test_input_in_weight_shapes(
      self, get_circuit, n_qubits
  ):  # pylint: disable=no-self-use
      """Test if a ValueError is raised when instantiated with a weight_shapes dictionary that
      contains the shape of the input argument given by the input_arg class attribute of
      TorchLayer"""
      c, w = get_circuit
      w[
          qml.qnn.torch.TorchLayer._input_arg
      ] = n_qubits  # pylint: disable=protected-access
      with pytest.raises(
          ValueError,
          match=f"{qml.qnn.torch.TorchLayer._input_arg} argument should not have its dimension",  # pylint: disable=protected-access
      ):
          TorchLayer(c, w)
  
imports: from unittest import mock
  import math
  from collections import defaultdict
  import numpy
  import pytest
  import pennylane
  from pennylane.qnn.torch import TorchLayer
label_desc: Use image node_id 3 for calling the TestTorchLayer obj's underlying member method code with example usage: obj.test_input_in_weight_shapes(get_circuit, n_qubits) without return types