class_docstr: Test caching for device jacobians.
class_docstr_tok: ["Test","caching","for","device","jacobians","."]
docstr: Test that a NotImplementedError is raised if somehow the results are cached
  without the jac being cached and execute_and_compute_jvp is called.
docstr_tok: ["Test","that","a","NotImplementedError","is","raised","if","somehow","the","results","are","cached","without","the","jac","being","cached","and","execute_and_compute_jvp","is","called","."]
code: def test_error_cant_cache_results_without_jac(self, jpc):
      """Test that a NotImplementedError is raised if somehow the results are cached
      without the jac being cached and execute_and_compute_jvp is called.
      """
  
      tape = qml.tape.QuantumScript([], [qml.state()])
      batch = (tape,)
      jpc._results_cache[batch] = "value"
  
      with pytest.raises(NotImplementedError):
          jpc.execute_and_compute_jacobian(batch)
  
imports: import pytest
  from cachetools import LRUCache
  from param_shift_dev import ParamShiftDerivativesDevice
  import numpy
  import pennylane
  from pennylane.workflow.jacobian_products import JacobianProductCalculator, TransformJacobianProducts, DeviceDerivatives, DeviceJacobianProducts, LightningVJPs
label_desc: Use image node_id 5 for calling the TestCachingDeviceDerivatives obj's underlying member method code with example usage: obj.test_error_cant_cache_results_without_jac(jpc) without return types