docstr: Test that an error is raised when a device with shots=None is used
  to obtain classical shadows
docstr_tok: ["Test","that","an","error","is","raised","when","a","device","with","shots=None","is","used","to","obtain","classical","shadows"]
code: def test_shots_none_error(self):
      """Test that an error is raised when a device with shots=None is used
      to obtain classical shadows"""
      circuit = hadamard_circuit(2, None)
      H = qml.PauliZ(0)
  
      msg = "not accepted for analytic simulation on default.qubit"
      with pytest.raises(qml.DeviceError, match=msg):
          _ = circuit(H, k=10)
  
imports: import copy
  import autograd.numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import ClassicalShadowMP, Shots
  from pennylane.measurements.classical_shadow import ShadowExpvalMP
label_desc: Use image node_id 5 for calling the TestExpvalMeasurement obj's underlying member method code with example usage: obj.test_shots_none_error() without return types