def METHOD_NAME(self):
    class TestModule(torch.nn.Module):
        def __init__(self, batch: int, k: int, n: int):
            super().__init__()
            self.other = torch.randn(batch, k, n)
        def forward(self, input: torch.Tensor):
            input1 = input.permute(0, 2, 1)
            output = torch.bmm(input1, self.other)
            return output
    batch, m, k, n = 6, 16, 8, 4
    trace_func = chain_passes(torch.fx.symbolic_trace, permute_matmul_fusion)
    module = TestModule(batch, k, n).eval()
    input = torch.randn(batch, k, m)
    traced = trace_func(module, [input])
    num_bmm = count_call_function(traced, torch.bmm)
    num_transpose_matmul = count_call_function(traced, transpose_matmul)
    self.assertEqual(num_bmm, 0)
    self.assertEqual(num_transpose_matmul, 1)
    self.assertTrue(torch.allclose(module(input), traced(input)))