def METHOD_NAME(self):
    @torch.jit.script
    def fn(arg1: str) -> str:
        return "%a in template" % arg1    # noqa: F501
    with self.assertRaisesRegexWithHighlight(RuntimeError,
                                             "The specifier %a is not supported in TorchScript format strings",
                                             "\"%a in template\" % arg1"):
        fn("foo")