def METHOD_NAME(self):
    @torch.jit.script
    def fn(arg1: str) -> str:
        return "%s %s in template" % arg1
    with self.assertRaisesRegexWithHighlight(RuntimeError,
                                             "Too few arguments for format string",
                                             "\"%s %s in template\" % arg1"):
        fn("foo")