code: def test_estimate_error(coefficients, err, shots_, var):
      r"""Test that the estimate_error function returns the correct error."""
      e_novar = qml.resource.estimate_error(coefficients, shots=shots_)
      e_var = qml.resource.estimate_error(
          coefficients, variances=var, shots=shots_
      )
  
      assert np.allclose(e_novar, err)
      assert np.allclose(e_var, err)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: test_estimate_error(coefficients, err, shots_, var) without return types