code: def mion_response_function(tr, oversampling=16, onset=0.0):
      """Implement the MION response function model.
  
      Parameters
      ----------
      tr: float
          scan repeat time, in seconds
      oversampling: int, optional
          temporal oversampling factor
      onset: float, optional
          hrf onset time, in seconds
  
      Returns
      -------
      response_function: array of shape(length / tr * oversampling, dtype=float)
          response_function sampling on the oversampled time grid
      """
      dt = tr / oversampling
      time_stamps = np.linspace(
          0, time_length, np.rint(time_length / dt).astype(int)
      )
      time_stamps -= onset
  
      # parameters of the gamma function
      delay = 1.55
      dispersion = 5.5
  
      response_function = gamma.pdf(
          time_stamps, delay, loc=0, scale=dispersion
      )
      response_function /= response_function.sum()
      response_function *= -1
  
      return response_function
  
imports: import numpy
  from scipy.stats import gamma
  import matplotlib.pyplot
  from nilearn.glm.first_level import compute_regressor
label_desc: Use image node_id 1 for calling a global function with example usage: mion_response_function(tr, oversampling, onset) and returns: response_function