def METHOD_NAME(self):
    # Test that calling to_here() in JIT will raise timeout error if
    # rpc.remote failed.
    if self.rank != 0:
        return
    dst_rank = (self.rank + 1) % self.world_size
    dst_worker = f"worker{dst_rank}"
    rref = rpc.remote(
        dst_worker, torch.add, args=(torch.tensor(1), torch.tensor(1))
    )
    # Will ensure error handling callbacks are run.
    wait_until_pending_futures_and_users_flushed()
    # Call to_here() within a ScriptFunction and ensure it raises
    with self.assertRaisesRegex(RuntimeError, "RRef creation"):
        rref_to_here(rref)