code: def test_extrapolation_modes(self):
      # test extrapolation modes
      #    * if ext=0, return the extrapolated value.
      #    * if ext=1, return 0
      #    * if ext=2, raise a ValueError
      #    * if ext=3, return the boundary value.
      x = [1, 2, 3]
      y = [0, 2, 4]
      tck = splrep(x, y, k=1)
  
      rstl = [[-2, 6], [0, 0], None, [0, 4]]
      for ext in (0, 1, 3):
          assert_array_almost_equal(
              splev([0, 4], tck, ext=ext), rstl[ext]
          )
  
      assert_raises(ValueError, splev, [0, 4], tck, ext=2)
  
imports: import itertools
  import os
  import numpy
  from numpy.testing import assert_equal, assert_allclose, assert_, assert_almost_equal, assert_array_almost_equal
  from pytest import raises
  import pytest
  from scipy._lib._testutils import check_free_memory
  from scipy.interpolate import RectBivariateSpline
  from scipy.interpolate._fitpack_py import splrep, splev, bisplrep, bisplev, sproot, splprep, splint, spalde, splder, splantider, insert, dblint
  from scipy.interpolate.dfitpack import regrid_smth
  from scipy.interpolate._fitpack2 import dfitpack_int
label_desc: Use image node_id 3 for calling the TestSplev obj's underlying member method code with example usage: obj.test_extrapolation_modes() without return types