code: def test_apply_beamforming(self):
      sr = 8000
      n_fft = 400
      batch_size, num_channels = 2, 3
      n_fft_bin = n_fft // 2 + 1
      x = get_whitenoise(
          sample_rate=sr,
          duration=0.05,
          n_channels=batch_size * num_channels,
      )
      specgram = get_spectrogram(x, n_fft=n_fft, hop_length=100)
      specgram = specgram.view(
          batch_size, num_channels, n_fft_bin, specgram.size(-1)
      )
      beamform_weights = torch.rand(
          batch_size, n_fft_bin, num_channels, dtype=torch.cfloat
      )
      self.assert_grad(
          F.apply_beamforming, (beamform_weights, specgram)
      )
  
imports: from functools import partial
  from typing import Callable, Tuple
  import torch
  import torchaudio.functional
  from parameterized import parameterized
  from torch import Tensor
  from torch.autograd import gradcheck, gradgradcheck
  from torchaudio_unittest.common_utils import get_spectrogram, get_whitenoise, nested_params, rnnt_utils, TestBaseMixin, use_deterministic_algorithms
label_desc: Use image node_id 34 for calling the Autograd obj's underlying member method code with example usage: obj.test_apply_beamforming() without return types