code: def _clean_rerp_input(X, data, reject, flat, decim, info, tstep):
      """Remove empty and contaminated points from data & predictor matrices."""
      # find only those positions where at least one predictor isn't 0
      has_val = np.unique(X.nonzero()[0])
  
      # reject positions based on extreme steps in the data
      if reject is not None:
          _, inds = _reject_data_segments(
              data, reject, flat, decim=None, info=info, tstep=tstep
          )
          for t0, t1 in inds:
              has_val = np.setdiff1d(has_val, range(t0, t1))
  
      return X.tocsr()[has_val], data[:, has_val]
  
file_path: mne-python/mne/stats/regression.py
imports: from collections import namedtuple
  from inspect import isgenerator
  import numpy
  from scipy import linalg, sparse, stats
  from .._fiff.pick import _picks_to_idx, pick_info, pick_types
  from ..epochs import BaseEpochs
  from ..evoked import Evoked, EvokedArray
  from ..source_estimate import SourceEstimate
  from ..utils import _reject_data_segments, fill_doc, logger, warn
label_desc: Use image node_id 6 for calling a global function with example usage: _clean_rerp_input(X, data, reject, flat, decim, info, tstep) and returns: X,  data