code: def test_sg_filter_basic():
      # Some basic test cases for savgol_filter().
      x = np.array([1.0, 2.0, 1.0])
      y = savgol_filter(x, 3, 1, mode="constant")
      assert_allclose(y, [1.0, 4.0 / 3, 1.0])
  
      y = savgol_filter(x, 3, 1, mode="mirror")
      assert_allclose(y, [5.0 / 3, 4.0 / 3, 5.0 / 3])
  
      y = savgol_filter(x, 3, 1, mode="wrap")
      assert_allclose(y, [4.0 / 3, 4.0 / 3, 4.0 / 3])
  
file_path: catboost/contrib/python/scipy/py3/scipy/signal/tests/test_savitzky_golay.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_equal, assert_almost_equal, assert_array_equal, assert_array_almost_equal
  from scipy.ndimage import convolve1d
  from scipy.signal import savgol_coeffs, savgol_filter
  from scipy.signal._savitzky_golay import _polyder
label_desc: Use image node_id 12 for calling a global function with example usage: test_sg_filter_basic() without return types