class_docstr: Test functions defined in `functional` module
class_docstr_tok: ["Test","functions","defined","in","`","functional","`","module"]
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 = common_utils.get_whitenoise(
          sample_rate=sr,
          duration=0.05,
          n_channels=batch_size * num_channels,
      )
      specgram = common_utils.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_batch_consistency(
          F.apply_beamforming, (beamform_weights, specgram)
      )
  
imports: import itertools
  import math
  from functools import partial
  import torch
  import torchaudio.functional
  from parameterized import parameterized, parameterized_class
  from torchaudio_unittest import common_utils
label_desc: Use image node_id 25 for calling the TestFunctional obj's underlying member method code with example usage: obj.test_apply_beamforming() without return types