code: def test_nearest(self):
      N = 5
      x = arange(N)
      y = arange(N)
      with suppress_warnings() as sup:
          sup.filter(DeprecationWarning, "`nearest` is deprecated")
          assert_allclose(y, nearest(x, y, x + 0.1))
          assert_allclose(y, nearest(x, y, x - 0.1))
  
file_path: catboost/contrib/python/scipy/py2/scipy/interpolate/tests/test_interpolate_wrapper.py
imports: from __future__ import division, print_function, absolute_import
  from numpy import arange, allclose, ones, isnan
  import numpy
  from numpy.testing import assert_, assert_allclose
  from scipy._lib._numpy_compat import suppress_warnings
  from scipy.interpolate.interpolate_wrapper import linear, logarithmic, block_average_above, nearest
label_desc: Use image node_id 2 for calling the Test obj's underlying member method code with example usage: obj.test_nearest() without return types