code: def openfmri2nipy(ons_dur_amp):
      """Contents of OpenFMRI condition file `ons_dur_map` as nipy recarray
  
      Parameters
      ----------
      ons_dur_amp : str or array
          Path to OpenFMRI stimulus file or 2D array containing three columns
          corresponding to onset, duration, amplitude.
  
      Returns
      -------
      block_spec : array
          Structured array with fields "start" (corresponding to onset time),
          "end" (onset time plus duration), "amplitude".
      """
      if not isinstance(ons_dur_amp, np.ndarray):
          ons_dur_amp = np.loadtxt(ons_dur_amp)
      onsets, durations, amplitudes = ons_dur_amp.T
      return make_recarray(
          np.column_stack((onsets, onsets + durations, amplitudes)),
          names=["start", "end", "amplitude"],
          drop_name_dim=True,
      )
  
imports: import itertools
  from functools import reduce
  from operator import mul
  import numpy
  from nipy.algorithms.statistics.formula import formulae
  from nipy.algorithms.statistics.formula.formulae import Factor, Formula, Term, make_recarray
  from nipy.algorithms.statistics.utils import combinations
  from .hrf import glover
  from .utils import T, blocks, convolve_functions, events
  from .utils import fourier_basis
label_desc: Use image node_id 9 for calling a global function with example usage: openfmri2nipy(ons_dur_amp) and returns: make_recarray