code: def temporal_derivative_distribution_repair(raw, *, verbose=None):
      """Apply temporal derivative distribution repair to data.
  
      Applies temporal derivative distribution repair (TDDR) to data
      :footcite:`FishburnEtAl2019`. This approach removes baseline shift
      and spike artifacts without the need for any user-supplied parameters.
  
      Parameters
      ----------
      raw : instance of Raw
          The raw data.
      %(verbose)s
  
      Returns
      -------
      raw : instance of Raw
           Data with TDDR applied.
  
      Notes
      -----
      TDDR was initially designed to be used on optical density fNIRS data but
      has been enabled to be applied on hemoglobin concentration fNIRS data as
      well in MNE. We recommend applying the algorithm to optical density fNIRS
      data as intended by the original author wherever possible.
  
      There is a shorter alias ``mne.preprocessing.nirs.tddr`` that can be used
      instead of this function (e.g. if line length is an issue).
  
      References
      ----------
      .. footbibliography::
      """
      raw = raw.copy().load_data()
      _validate_type(raw, BaseRaw, "raw")
      picks = _validate_nirs_info(raw.info)
  
      if not len(picks):
          raise RuntimeError(
              "TDDR should be run on optical density or "
              "hemoglobin data."
          )
      for pick in picks:
          raw._data[pick] = _TDDR(raw._data[pick], raw.info["sfreq"])
  
      return raw
  
imports: import numpy
  from scipy.signal import butter, filtfilt
  from ...io import BaseRaw
  from ...utils import _validate_type, verbose
  from ..nirs import _validate_nirs_info
label_desc: Use image node_id 1 for calling a global function with example usage: temporal_derivative_distribution_repair(raw) and returns: raw