code: def test_frontend_backward_multi_channel(
      train, use_wpe, use_beamformer
  ):
      torch.random.manual_seed(14)
      frontend = DefaultFrontend(
          fs=300,
          n_fft=128,
          win_length=128,
          frontend_conf={
              "use_wpe": use_wpe,
              "use_beamformer": use_beamformer,
          },
      )
      for name, p in frontend.named_parameters():
          if ".bias" in name and p.dim() == 1:
              p.data.fill_(1)
          else:
              p.data.zero_()
      if train:
          frontend.train()
      else:
          frontend.eval()
      pad = random_rir.size(1)
      envelope = torch.sin(torch.linspace(0, 20 * torch.pi, 1024)) + 1.5
      x = torch.sin(envelope * 2 * torch.pi * torch.arange(1024) / 300)
      x = torch.nn.functional.pad(x.repeat(2, 1, 1), (pad, pad))
      x = torch.nn.functional.conv1d(
          x, random_rir.unsqueeze(1)
      ).transpose(1, 2)
      x = x[:, (pad - 1) // 2 : (pad - 1) // 2 + 1024]
      x.requires_grad = True
      x_lengths = torch.LongTensor([1024, 1000])
      y, y_lengths = frontend(x, x_lengths)
      y.sum().backward()
  
imports: import pytest
  import torch
  from espnet2.asr.frontend.default import DefaultFrontend
label_desc: Use image node_id 4 for calling a global function with example usage: test_frontend_backward_multi_channel(train, use_wpe, use_beamformer) without return types