code: def _make_drift(drift_model, frametimes, order=1, hfcut=128.0):
      """Create the drift matrix
  
      Parameters
      ----------
      drift_model: string,
                  to be chosen among 'polynomial', 'cosine', 'blank'
                  that specifies the desired drift model
      frametimes: array of shape(n_scans),
                  list of values representing the desired TRs
      order: int, optional,
             order of the drift model (in case it is polynomial)
      hfcut: float, optional,
             frequency cut in case of a cosine model
  
      Returns
      -------
      drift: array of shape(n_scans, n_drifts), the drift matrix
      names: list of length(ndrifts), the associated names
      """
      drift_model = drift_model.lower()  # for robust comparisons
      if drift_model == "polynomial":
          drift = _poly_drift(order, frametimes)
      elif drift_model == "cosine":
          drift = _cosine_drift(hfcut, frametimes)
      elif drift_model == "blank":
          drift = _blank_drift(frametimes)
      else:
          raise NotImplementedError(
              f"Unknown drift model {drift_model!r}"
          )
      names = []
      for k in range(drift.shape[1] - 1):
          names.append("drift_%d" % (k + 1))
      names.append("constant")
      return drift, names
  
file_path: nipy/nipy/modalities/fmri/design_matrix.py
imports: from warnings import warn
  import numpy
  from .hemodynamic_models import _orthogonalize, compute_regressor
label_desc: Use image node_id 4 for calling a global function with example usage: _make_drift(drift_model, frametimes, order, hfcut) and returns: drift,  names