code: def doas2taus(doas, mics, fs, c=343.0):
      """This function converts directions of arrival (xyz coordinates
      expressed in meters) in time differences of arrival (expressed in
      samples). The result has the following format: (batch, time_steps, n_mics).
  
      Arguments
      ---------
      doas : tensor
          The directions of arrival expressed with cartesian coordinates (xyz)
          in meters. The tensor must have the following format: (batch, time_steps, 3).
      mics : tensor
          The cartesian position (xyz) in meters of each microphone.
          The tensor must have the following format (n_mics, 3).
      fs : int
          The sample rate in Hertz of the signals.
      c : float
          The speed of sound in the medium. The speed is expressed in meters
          per second and the default value of this parameter is 343 m/s.
  
      Example
      -------
      >>> import torch
  
      >>> from speechbrain.dataio.dataio import read_audio
      >>> from speechbrain.processing.multi_mic import sphere, doas2taus
  
      >>> xs = read_audio('tests/samples/multi-mic/speech_-0.82918_0.55279_-0.082918.flac')
      >>> xs = xs.unsqueeze(0) # [batch, time, channels]
      >>> fs = 16000
      >>> mics = torch.zeros((4,3), dtype=torch.float)
      >>> mics[0,:] = torch.FloatTensor([-0.05, -0.05, +0.00])
      >>> mics[1,:] = torch.FloatTensor([-0.05, +0.05, +0.00])
      >>> mics[2,:] = torch.FloatTensor([+0.05, +0.05, +0.00])
      >>> mics[3,:] = torch.FloatTensor([+0.05, +0.05, +0.00])
  
      >>> doas = sphere()
      >>> taus = doas2taus(doas, mics, fs)
      """
  
      taus = (fs / c) * torch.matmul(
          doas.to(mics.device), mics.transpose(0, 1)
      )
  
      return taus
  
imports: import torch
  from packaging import version
  import speechbrain.processing.decomposition
label_desc: Use image node_id 1 for calling a global function with example usage: doas2taus(doas, mics, fs, c) and returns: taus