code: def test_analytic_deprecation():
      """Tests if the kwarg `analytic` is used and displays error message."""
      msg = "The analytic argument has been replaced by shots=None. "
      msg += "Please use shots=None instead of analytic=True."
  
      with pytest.raises(
          DeviceError,
          match=msg,
      ):
          qml.device("default.mixed", wires=1, shots=1, analytic=True)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices.default_mixed import DefaultMixed
  from pennylane import DeviceError
label_desc: Use image node_id 1 for calling a global function with example usage: test_analytic_deprecation() without return types