def reserve(self, timeout=None):
if timeout is not None:<EOL><INDENT>command = '<STR_LIT>' % timeout<EOL><DEDENT>else:<EOL><INDENT>command = '<STR_LIT>'<EOL><DEDENT>try:<EOL><INDENT>return self._interact_job(command,<EOL>['<STR_LIT>'],<EOL>['<STR_LIT>', '<STR_LIT>'])<EOL><DEDENT>except CommandFailed:<EOL><INDENT>exc = sys.exc_info()[<NUM_LIT:1>]<EOL>_, status, results = exc.args<EOL>if status == '<STR_LIT>':<EOL><INDENT>return None<EOL><DEDENT>elif status == '<STR_LIT>':<EOL><INDENT>raise DeadlineSoon(results)<EOL><DEDENT><DEDENT>
Reserve a job from one of the watched tubes, with optional timeout
        in seconds. Returns a Job object, or None if the request times out.