code: def gabor_impulse_response_legacy_complex(t, center, fwhm):
      """
      Function for generating gabor impulse responses, but without using complex64 dtype
      as used by GaborConv1d proposed in
  
      Neil Zeghidour, Olivier Teboul, F{\'e}lix de Chaumont Quitry & Marco Tagliasacchi, "LEAF: A LEARNABLE FRONTEND
      FOR AUDIO CLASSIFICATION", in Proc of ICLR 2021 (https://arxiv.org/abs/2101.08596)
      """
      denominator = 1.0 / (
          torch.sqrt(torch.tensor(2.0) * math.pi) * fwhm
      )
      gaussian = torch.exp(
          torch.tensordot(
              1.0 / (2.0 * fwhm.unsqueeze(1) ** 2),
              (-(t**2.0)).unsqueeze(0),
              dims=1,
          )
      )
      temp = torch.tensordot(
          center.unsqueeze(1), t.unsqueeze(0), dims=1
      )
      temp2 = torch.zeros(*temp.shape + (2,), device=temp.device)
  
      # since output of torch.tensordot(..) is multiplied by 0+j
      # output can simply be written as flipping real component of torch.tensordot(..) to the imag component
  
      temp2[:, :, 0] *= -1 * temp2[:, :, 0]
      temp2[:, :, 1] = temp[:, :]
  
      # exponent of complex number c is
      # o.real = exp(c.real) * cos(c.imag)
      # o.imag = exp(c.real) * sin(c.imag)
  
      sinusoid = torch.zeros_like(temp2, device=temp.device)
      sinusoid[:, :, 0] = torch.exp(temp2[:, :, 0]) * torch.cos(
          temp2[:, :, 1]
      )
      sinusoid[:, :, 1] = torch.exp(temp2[:, :, 0]) * torch.sin(
          temp2[:, :, 1]
      )
  
      # multiplication of two complex numbers c1 and c2 -> out:
      # out.real = c1.real * c2.real - c1.imag * c2.imag
      # out.imag = c1.real * c2.imag + c1.imag * c2.real
  
      denominator_sinusoid = torch.zeros(
          *temp.shape + (2,), device=temp.device
      )
  
      denominator_sinusoid[:, :, 0] = (
          denominator.view(-1, 1) * sinusoid[:, :, 0]
      ) - (
          torch.zeros_like(denominator).view(-1, 1) * sinusoid[:, :, 1]
      )
  
      denominator_sinusoid[:, :, 1] = (
          denominator.view(-1, 1) * sinusoid[:, :, 1]
      ) + (
          torch.zeros_like(denominator).view(-1, 1) * sinusoid[:, :, 0]
      )
  
      output = torch.zeros(*temp.shape + (2,), device=temp.device)
  
      output[:, :, 0] = (denominator_sinusoid[:, :, 0] * gaussian) - (
          denominator_sinusoid[:, :, 1] * torch.zeros_like(gaussian)
      )
      output[:, :, 1] = (
          denominator_sinusoid[:, :, 0] * torch.zeros_like(gaussian)
      ) + (denominator_sinusoid[:, :, 1] * gaussian)
      return output
  
file_path: speechbrain/speechbrain/processing/signal_processing.py
imports: import torch
  import math
  from packaging import version
label_desc: Use image node_id 12 for calling a global function with example usage: gabor_impulse_response_legacy_complex(t, center, fwhm) and returns: output