code: def test_interp():
      times = [0, 4, 5.0]
      values = [2.0, 4, 6]
      for int_func in (interp, linear_interp):
          s = int_func(times, values, np.nan)
          tval = np.array([-0.1, 0.1, 3.9, 4.1, 5.1])
          res = lambdify(t, s)(tval)
          assert_array_equal(
              np.isnan(res), [True, False, False, False, True]
          )
          assert_array_almost_equal(res[1:-1], [2.05, 3.95, 4.2])
          # default is zero fill
          s = int_func(times, values)
          res = lambdify(t, s)(tval)
          assert_array_almost_equal(res, [0, 2.05, 3.95, 4.2, 0])
          # Can be some other value
          s = int_func(times, values, fill=10)
          res = lambdify(t, s)(tval)
          assert_array_almost_equal(res, [10, 2.05, 3.95, 4.2, 10])
          # If fill is None, raises error on interpolation outside bounds
          s = int_func(times, values, fill=None)
          f = lambdify(t, s)
          assert_array_almost_equal(f(tval[1:-1]), [2.05, 3.95, 4.2])
          pytest.raises(ValueError, f, tval[:-1])
          # specifying kind as linear is OK
          s = linear_interp(times, values, kind="linear")
          # bounds_check should match fill
          int_func(times, values, bounds_error=False)
          int_func(times, values, fill=None, bounds_error=True)
          pytest.raises(
              ValueError, int_func, times, values, bounds_error=True
          )
          # fill should match fill value
          int_func(times, values, fill=10, fill_value=10)
          int_func(times, values, fill_value=0)
          pytest.raises(
              ValueError, int_func, times, values, fill=10, fill_value=9
          )
          int_func(times, values, fill=np.nan, fill_value=np.nan)
          pytest.raises(
              ValueError,
              int_func,
              times,
              values,
              fill=10,
              fill_value=np.nan,
          )
          pytest.raises(
              ValueError,
              int_func,
              times,
              values,
              fill=np.nan,
              fill_value=0,
          )
  
imports: import re
  import numpy
  import pytest
  import sympy
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from sympy import DiracDelta, Dummy, Function, Symbol
  from sympy.utilities.lambdify import implemented_function, lambdify
  from nipy.algorithms.statistics.formula import Term
  from ..None import hrf
  from ..utils import Interp1dNumeric, TimeConvolver, blocks, convolve_functions, define, events, interp, lambdify_t, linear_interp, step_function
label_desc: Use image node_id 3 for calling a global function with example usage: test_interp() without return types