code: def test_matching_quad(self):
      def func(x):
          return x**2 + 1
  
      res, reserr = quad(func, 0, 4)
      res2, reserr2 = nquad(func, ranges=[[0, 4]])
      assert_almost_equal(res, res2)
      assert_almost_equal(reserr, reserr2)
  
imports: import sys
  import math
  import numpy
  from numpy import sqrt, cos, sin, arctan, exp, log, pi
  from numpy.testing import assert_, assert_allclose, assert_array_less, assert_almost_equal
  import pytest
  from scipy.integrate import quad, dblquad, tplquad, nquad
  from scipy.special import erf, erfc
  from scipy._lib._ccallback import LowLevelCallable
  import ctypes
  import ctypes.util
  from scipy._lib._ccallback_c import sine_ctypes
  import scipy.integrate._test_multivariate
label_desc: Use image node_id 7 for calling the TestNQuad obj's underlying member method code with example usage: obj.test_matching_quad() and returns: unknown