#NEWLINE# def rv( self , argIndex = None ) : #NEWLINE# #INDENT# '\n        Gets a *promise* (:class:`toil.job.PromisedJobReturnValue`) representing         a return value of the job\'s run function.\n        \n        :param argIndex: If None the complete return value will be returned,         if argIndex is an integer it is used to refer to the return value as indexable         (tuple/list/dictionary, or in general an object that implements __getitem__),         hence rv(i) would refer to the ith (indexed from 0) member of the return value.\n        :type argIndex: int or None\n        \n        :return: A promise representing the return value of the :func:`toil.job.Job.run` function. \n        \n        :rtype: toil.job.PromisedJobReturnValue, referred to as a "promise"\n        ' #NEWLINE# if ( argIndex not in self . _rvs ) : #NEWLINE# #INDENT# self . _rvs [ argIndex ] = [ ] #NEWLINE# #UNINDENT# def registerPromiseCallBack( ) : #NEWLINE# #INDENT# if ( self . _promiseJobStore == None ) : #NEWLINE# #INDENT# raise RuntimeError ( 'Trying to pass a promise from a promising job that is not predecessor of the job receiving the promise' ) #NEWLINE# #UNINDENT# jobStoreFileID = self . _promiseJobStore . getEmptyFileStoreID ( ) #NEWLINE# self . _rvs [ argIndex ] . append ( jobStoreFileID ) #NEWLINE# return ( jobStoreFileID , self . _promiseJobStore . config . jobStore ) #NEWLINE# #UNINDENT# return PromisedJobReturnValue ( registerPromiseCallBack )