code: def steering(taus, n_fft):
      """This function computes a steering vector by using the time differences
      of arrival for each channel (in samples) and the number of bins (n_fft).
      The result has the following format: (batch, time_step, n_fft/2 + 1, 2, n_mics).
  
      Arguments:
      ----------
      taus : tensor
          The time differences of arrival for each channel. The tensor must have
          the following format: (batch, time_steps, n_mics).
  
      n_fft : int
          The number of bins resulting of the STFT. It is assumed that the
          argument "onesided" was set to True for the STFT.
  
      Example:
      --------f
      >>> 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, steering
      >>>
      >>> 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) # [batch, time, channels]
      >>> fs = 16000
  
      >>> stft = STFT(sample_rate=fs)
      >>> cov = Covariance()
      >>> gccphat = GccPhat()
      >>>
      >>> Xs = stft(xs)
      >>> n_fft = Xs.shape[2]
      >>> XXs = cov(Xs)
      >>> tdoas = gccphat(XXs)
      >>> taus = tdoas2taus(tdoas)
      >>> As = steering(taus, n_fft)
      """
  
      # Collecting useful numbers
      pi = 3.141592653589793
  
      frame_size = int((n_fft - 1) * 2)
  
      # Computing the different parts of the steering vector
      omegas = (
          2
          * pi
          * torch.arange(0, n_fft, device=taus.device)
          / frame_size
      )
      omegas = omegas.repeat(taus.shape + (1,))
      taus = taus.unsqueeze(len(taus.shape)).repeat(
          (1,) * len(taus.shape) + (n_fft,)
      )
  
      # Assembling the steering vector
      a_re = torch.cos(-omegas * taus)
      a_im = torch.sin(-omegas * taus)
      a = torch.stack((a_re, a_im), len(a_re.shape))
      a = a.transpose(len(a.shape) - 3, len(a.shape) - 1).transpose(
          len(a.shape) - 3, len(a.shape) - 2
      )
  
      return a
  
imports: import torch
  from packaging import version
  import speechbrain.processing.decomposition
label_desc: Use image node_id 3 for calling a global function with example usage: steering(taus, n_fft) and returns: a