code: def test_openfmri2nipy():
      # Test loading / processing OpenFMRI stimulus file
      stim_file = pjoin(THIS_DIR, "cond_test1.txt")
      ons_dur_amp = np.loadtxt(stim_file)
      onsets, durations, amplitudes = ons_dur_amp.T
      for in_param in (stim_file, ons_dur_amp):
          res = openfmri2nipy(in_param)
          assert res.dtype.names == ("start", "end", "amplitude")
          assert_array_equal(res["start"], onsets)
          assert_array_equal(res["end"], onsets + durations)
          assert_array_equal(res["amplitude"], amplitudes)
  
file_path: nipy/nipy/modalities/fmri/tests/test_design.py
imports: 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 nipy.algorithms.statistics.formula import make_recarray
  from ..design import block_amplitudes, block_design, event_design, openfmri2nipy, stack2designs, stack_designs
  from ..hrf import dglover, glover
  from ..utils import T, blocks, convolve_functions, events, lambdify_t
label_desc: Use image node_id 5 for calling a global function with example usage: test_openfmri2nipy() without return types