def METHOD_NAME(self):
    @torch.jit.script
    def fn(arg1: str) -> str:
        return "%s in template %" % arg1    # noqa: F501
    with self.assertRaisesRegexWithHighlight(RuntimeError,
                                             "Incomplete format specifier",
                                             "\"%s in template %\" % arg1"):
        fn("foo")