code: def _resample_regressor(
      hr_regressor, hr_frametimes, frametimes, kind="linear"
  ):
      """this function samples the regressors at frametimes
  
      Parameters
      ----------
      hr_regressor: array of shape(n),
                    the regressor time course sampled at high temporal resolution
      hr_frametimes: array of shape(n),
                     the corresponding time stamps
      frametimes: array of shape(p),
                  the desired time stamps
      kind: string, optional, the kind of desired interpolation
  
      Returns
      -------
      regressor: array of shape(p), the resampled regressor
      """
      from scipy.interpolate import interp1d
  
      f = interp1d(hr_frametimes, hr_regressor)
      return f(frametimes).T
  
file_path: nipy/nipy/modalities/fmri/hemodynamic_models.py
imports: import warnings
  import numpy
  from scipy.stats import gamma
label_desc: Use image node_id 8 for calling a global function with example usage: _resample_regressor(hr_regressor, hr_frametimes, frametimes, kind) and returns: f