class_docstr: Test tensor expectation values
class_docstr_tok: ["Test","tensor","expectation","values"]
code: def tolerance(self, shots, tol):
      if shots is not None:
          return {"atol": 0.01, "rtol": 0.1}
  
      return {"atol": tol, "rtol": 0}
  
imports: import functools
  import pytest
  import numpy
  import pennylane
  from pennylane import expval, var, sample
label_desc: Use image node_id 1 for calling the TestTensorExpval obj's underlying member method code with example usage: obj.tolerance(shots, tol) and returns: dict, dict