class_docstr: Test suite for classes defined in `transforms` module
class_docstr_tok: ["Test","suite","for","classes","defined","in","`","transforms","`","module"]
code: def test_convolve(self, cls, mode):
      leading_dims = (2, 3)
      L_x, L_y = 89, 43
      x = torch.rand(
          *leading_dims, L_x, dtype=self.dtype, device=self.device
      )
      y = torch.rand(
          *leading_dims, L_y, dtype=self.dtype, device=self.device
      )
  
      convolve = getattr(T, cls)(mode=mode)
      actual = convolve(x, y)
      expected = torch.stack(
          [
              torch.stack(
                  [
                      convolve(
                          x[i, j].unsqueeze(0), y[i, j].unsqueeze(0)
                      ).squeeze(0)
                      for j in range(leading_dims[1])
                  ]
              )
              for i in range(leading_dims[0])
          ]
      )
  
      self.assertEqual(expected, actual)
  
imports: import os
  import torch
  from parameterized import parameterized
  from torchaudio import transforms
  from torchaudio_unittest import common_utils
label_desc: Use image node_id 23 for calling the TestTransforms obj's underlying member method code with example usage: obj.test_convolve(cls, mode) without return types