class_docstr: Unit tests for the pennylane.qnn.keras.KerasLayer class.
class_docstr_tok: ["Unit","tests","for","the","pennylane.qnn.keras.KerasLayer","class","."]
docstr: Test if a TypeError is raised when instantiated with a variable number of positional
  arguments
docstr_tok: ["Test","if","a","TypeError","is","raised","when","instantiated","with","a","variable","number","of","positional","arguments"]
code: def test_var_pos(self):  # pylint: disable=no-self-use
      """Test if a TypeError is raised when instantiated with a variable number of positional
      arguments"""
      dev = qml.device("default.qubit", wires=1)
      weight_shapes = {"w1": (3, 3), "w2": 1}
  
      @qml.qnode(dev, interface="tf")
      def circuit(
          inputs, w1, w2, *args
      ):  # pylint: disable=unused-argument
          return qml.expval(qml.PauliZ(0))
  
      with pytest.raises(
          TypeError, match="Cannot have a variable number of positional"
      ):
          KerasLayer(circuit, weight_shapes, output_dim=1)
  
imports: from collections import defaultdict
  import numpy
  import pytest
  import pennylane
label_desc: Use image node_id 5 for calling the TestKerasLayer obj's underlying member method code with example usage: obj.test_var_pos() and returns: qml