code: def tdoas2taus(tdoas):
      """This function selects the tdoas of each channel and put them
      in a tensor. The result has the following format:
      (batch, time_steps, n_mics).
  
      Arguments:
      ----------
      tdoas : tensor
         The time difference of arrival (TDOA) (in samples) for
         each timestamp. The tensor has the format
         (batch, time_steps, n_mics + n_pairs).
  
      Example
      -------
      >>> import torch
      >>> from speechbrain.dataio.dataio import read_audio
      >>> from speechbrain.processing.features import STFT
      >>> from speechbrain.processing.multi_mic import Covariance
      >>> from speechbrain.processing.multi_mic import GccPhat, tdoas2taus
      >>>
      >>> xs_speech = read_audio(
      ...    'tests/samples/multi-mic/speech_-0.82918_0.55279_-0.082918.flac'
      ... )
      >>> xs_noise = read_audio('tests/samples/multi-mic/noise_diffuse.flac')
      >>> xs = xs_speech + 0.05 * xs_noise
      >>> xs = xs.unsqueeze(0)
      >>> fs = 16000
      >>>
      >>> stft = STFT(sample_rate=fs)
      >>> cov = Covariance()
      >>> gccphat = GccPhat()
      >>>
      >>> Xs = stft(xs)
      >>> XXs = cov(Xs)
      >>> tdoas = gccphat(XXs)
      >>> taus = tdoas2taus(tdoas)
      """
  
      n_pairs = tdoas.shape[len(tdoas.shape) - 1]
      n_channels = int(((1 + 8 * n_pairs) ** 0.5 - 1) / 2)
      taus = tdoas[..., range(0, n_channels)]
  
      return taus
  
imports: import torch
  from packaging import version
  import speechbrain.processing.decomposition
label_desc: Use image node_id 2 for calling a global function with example usage: tdoas2taus(tdoas) and returns: taus