class_docstr: Tests for variance of tensor observables
class_docstr_tok: ["Tests","for","variance","of","tensor","observables"]
code: def tolerance(self, shots, tol):
      if shots is not None:
          return {"atol": 0.01, "rtol": 0.2}
  
      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 TestTensorVar obj's underlying member method code with example usage: obj.tolerance(shots, tol) and returns: dict, dict