code: def fftconvolve(
      x: torch.Tensor, y: torch.Tensor, mode: str = "full"
  ) -> torch.Tensor:
      r"""
      Convolves inputs along their last dimension using FFT. For inputs with large last dimensions, this function
      is generally much faster than :meth:`convolve`.
      Note that, in contrast to :meth:`torch.nn.functional.conv1d`, which actually applies the valid cross-correlation
      operator, this function applies the true `convolution`_ operator.
      Also note that this function can only output float tensors (int tensor inputs will be cast to float).
  
      .. devices:: CPU CUDA
  
      .. properties:: Autograd TorchScript
  
      Args:
          x (torch.Tensor): First convolution operand, with shape `(..., N)`.
          y (torch.Tensor): Second convolution operand, with shape `(..., M)`
              (leading dimensions must be broadcast-able with those of ``x``).
          mode (str, optional): Must be one of ("full", "valid", "same").
  
              * "full": Returns the full convolution result, with shape `(..., N + M - 1)`. (Default)
              * "valid": Returns the segment of the full convolution result corresponding to where
                the two inputs overlap completely, with shape `(..., max(N, M) - min(N, M) + 1)`.
              * "same": Returns the center segment of the full convolution result, with shape `(..., N)`.
  
      Returns:
          torch.Tensor: Result of convolving ``x`` and ``y``, with shape `(..., L)`, where
          the leading dimensions match those of ``x`` and `L` is dictated by ``mode``.
  
      .. _convolution:
          https://en.wikipedia.org/wiki/Convolution
      """
      _check_shape_compatible(x, y)
      _check_convolve_mode(mode)
  
      n = x.size(-1) + y.size(-1) - 1
      fresult = torch.fft.rfft(x, n=n) * torch.fft.rfft(y, n=n)
      result = torch.fft.irfft(fresult, n=n)
      return _apply_convolve_mode(result, x.size(-1), y.size(-1), mode)
  
imports: import math
  import tempfile
  import warnings
  from collections.abc import Sequence
  from typing import List, Optional, Tuple, Union
  import torch
  import torchaudio
  from torch import Tensor
  from torchaudio._internal.module_utils import deprecated
  from .filtering import highpass_biquad, treble_biquad
label_desc: Use image node_id 50 for calling a global function with example usage: fftconvolve(x, y, mode) and returns: _apply_convolve_mode