code: def test_dct_ii_cut_basis():
      # DCT-II basis with cut frequency
      for dt, cut_period, N in product(
          (0.1, 1.1), (10.1, 20.1), (20, 100, 1000)
      ):
          times = np.arange(N) * dt
          order = int(np.floor(2 * N * 1.0 / cut_period * dt))
          dct_vals = dct_ii_cut_basis(times, cut_period)
          if order == 0:
              assert_array_equal(dct_vals, np.ones((N, 1)))
              continue
          dct_expected = np.ones((N, order))
          dct_expected[:, :-1] = dct_ii_basis(
              times, order, normcols=True
          )[:, 1:]
          assert_array_equal(dct_vals, dct_expected)
  
file_path: nipy/nipy/modalities/fmri/tests/test_realfuncs.py
imports: from itertools import product
  from os.path import dirname
  from os.path import join
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  from ..realfuncs import dct_ii_basis, dct_ii_cut_basis
label_desc: Use image node_id 2 for calling a global function with example usage: test_dct_ii_cut_basis() without return types