code: def compute_regressor(
      exp_condition,
      hrf_model,
      frame_times,
      con_id="cond",
      oversampling=50,
      fir_delays=None,
      min_onset=-24,
  ):
      """Convolve regressors with :term:`HRF` model.
  
      Parameters
      ----------
      exp_condition : array-like of shape (3, n_events)
          yields description of events for this condition as a
          (onsets, durations, amplitudes) triplet
      %(hrf_model)s
      frame_times : array of shape (n_scans)
          the desired sampling times
  
      con_id : string, default='cond'
          Identifier of the condition
  
      oversampling : int, default=50
          Oversampling factor to perform the convolution.
  
      fir_delays : [int] 1D-array-like, optional
          Delays (in scans) used in case of a finite impulse response model.
  
      min_onset : float, default=-24
          Minimal onset relative to frame_times[0] (in seconds)
          events that start before frame_times[0] + min_onset are not considered.
  
      Returns
      -------
      computed_regressors : array of shape(n_scans, n_reg)
          Computed regressors sampled at frame times.
  
      reg_names : list of strings
          Corresponding regressor names.
  
      """
      # fir_delays should be integers
      if fir_delays is not None:
          fir_delays = [int(x) for x in fir_delays]
      oversampling = int(oversampling)
  
      # this is the minimal tr in this run, not necessarily the true tr
      tr = _calculate_tr(frame_times)
      # 1. create the high temporal resolution regressor
      hr_regressor, frame_times_high_res = _sample_condition(
          exp_condition, frame_times, oversampling, min_onset
      )
  
      # 2. create the  hrf model(s)
      hkernel = _hrf_kernel(hrf_model, tr, oversampling, fir_delays)
  
      # 3. convolve the regressor and hrf, and downsample the regressor
      conv_reg = np.array(
          [
              np.convolve(hr_regressor, h)[: hr_regressor.size]
              for h in hkernel
          ]
      )
  
      # 4. temporally resample the regressors
      if hrf_model == "fir" and oversampling > 1:
          computed_regressors = _resample_regressor(
              conv_reg[:, oversampling - 1 :],
              frame_times_high_res[: 1 - oversampling],
              frame_times,
          )
      else:
          computed_regressors = _resample_regressor(
              conv_reg, frame_times_high_res, frame_times
          )
  
      # 5. ortogonalize the regressors
      if hrf_model != "fir":
          computed_regressors = orthogonalize(computed_regressors)
  
      # 6 generate regressor names
      reg_names = _regressor_names(
          con_id, hrf_model, fir_delays=fir_delays
      )
      return computed_regressors, reg_names
  
imports: import warnings
  from collections.abc import Iterable
  import numpy
  from scipy.stats import gamma
  from nilearn._utils import fill_doc
label_desc: Use image node_id 18 for calling a global function with example usage: compute_regressor(exp_condition, hrf_model, frame_times, con_id, oversampling, fir_delays, min_onset) and returns: computed_regressors,  reg_names