def METHOD_NAME(self):
    r"""Verify that scripting RNNTBeamSearch does not change the behavior of method `forward`."""
    input_config = self._get_input_config()
    batch_size = input_config["batch_size"]
    max_input_length = input_config["max_input_length"]
    right_context_length = input_config["right_context_length"]
    input_dim = input_config["input_dim"]
    num_symbols = input_config["num_symbols"]
    blank_idx = num_symbols - 1
    beam_width = 5
    input = torch.rand(batch_size, max_input_length + right_context_length, input_dim).to(
        device=self.device, dtype=self.dtype
    )
    lengths = torch.randint(1, max_input_length + 1, (batch_size,)).to(device=self.device, dtype=torch.int32)
    model = self._get_model()
    beam_search = RNNTBeamSearch(model, blank_idx)
    scripted = torch_script(beam_search)
    res = beam_search(input, lengths, beam_width)
    scripted_res = scripted(input, lengths, beam_width)
    self.assertEqual(res, scripted_res)