code: def test_sg_filter_trivial():
      """Test some trivial edge cases for savgol_filter()."""
      x = np.array([1.0])
      y = savgol_filter(x, 1, 0)
      assert_equal(y, [1.0])
  
      # Input is a single value. With a window length of 3 and polyorder 1,
      # the value in y is from the straight-line fit of (-1,0), (0,3) and
      # (1, 0) at 0. This is just the average of the three values, hence 1.0.
      x = np.array([3.0])
      y = savgol_filter(x, 3, 1, mode="constant")
      assert_almost_equal(y, [1.0], decimal=15)
  
      x = np.array([3.0])
      y = savgol_filter(x, 3, 1, mode="nearest")
      assert_almost_equal(y, [3.0], decimal=15)
  
      x = np.array([1.0] * 3)
      y = savgol_filter(x, 3, 1, mode="wrap")
      assert_almost_equal(y, [1.0, 1.0, 1.0], decimal=15)
  
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 11 for calling a global function with example usage: test_sg_filter_trivial() without return types