def METHOD_NAME(self):
    @torch.jit.ignore
    def python_op(x):
        raise Exception("bad!")
    @torch.jit.script
    def fn(x):
        return python_op(x)
    with self.assertRaisesRegex(RuntimeError, "operation failed in the TorchScript interpreter"):
        fn(torch.tensor(4))