code: def extract_outlier_regressors(confounds):
      """Separate outlier one-hot regressors from other confounds \
      variables and generate a sample mask, indicates the volumes kept.
  
      Parameters
      ----------
      confounds : pandas.DataFrame
          DataFrame of confounds.
  
      Returns
      -------
      sample_mask : numpy.ndarray
          Index array of shape (n_samples) indicating the volumes
          that are not outliers.
  
      confounds : pandas.DataFrame
          DataFrame of confounds without the one-hot encoders for
          outlier regressors.
  
      outliers : pandas.DataFrame
          DataFrame of outlier regressors.
      """
      outlier_cols, confounds_cols = _get_outlier_cols(
          confounds.columns
      )
      if outlier_cols:
          outliers = confounds.loc[:, outlier_cols]
          outliers = outliers.T.drop_duplicates().T
      else:
          outliers = pd.DataFrame()
      confounds = confounds.loc[:, confounds_cols]
      sample_mask = _outlier_to_sample_mask(outliers)
      return sample_mask, confounds, outliers
  
imports: import numpy
  import pandas
label_desc: Use image node_id 2 for calling a global function with example usage: extract_outlier_regressors(confounds) and returns: sample_mask,  confounds,  outliers