code: def _handle_non_steady(confounds):
      """Simulate non steady state correctly while increase the length."""
      X = confounds.values
      # the first row is non-steady state, replace it with the input from the
      # second row
      non_steady = X[0, :]
      X[0, :] = X[1, :]
      # repeat X in length (axis = 0) 10 times to increase
      # the degree of freedom for numerical stability
      X = np.tile(X, (10, 1))
      # put non-steady state volume back at the first sample
      X[0, :] = non_steady
      X = pd.DataFrame(X, columns=confounds.columns)
      return X
  
imports: import re
  import numpy
  import pandas
  import pytest
  from nibabel import Nifti1Image
  from scipy.stats import pearsonr
  from sklearn.preprocessing import scale
  from nilearn._utils.data_gen import create_fake_bids_dataset
  from nilearn._utils.fmriprep_confounds import to_camel_case
  from nilearn.conftest import _rng
  from nilearn.interfaces.bids import get_bids_files
  from nilearn.interfaces.fmriprep import load_confounds
  from nilearn.interfaces.fmriprep.load_confounds import _check_strategy, _load_single_confounds_file
  from nilearn.interfaces.fmriprep.tests._testing import create_tmp_filepath, get_legal_confound
  from nilearn.maskers import NiftiMasker
label_desc: Use image node_id 2 for calling a global function with example usage: _handle_non_steady(confounds) and returns: X