<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wait_locally(self):
 """If you have run the query in a non-blocking way, call this method to pause until the query is finished."""

        try: self.thread.join(sys.maxint) # maxint timeout so that we can Ctrl-C them
        except KeyboardInterrupt: print "Stopped waiting on job '%s'" % self.kwargs['job_name']