def _generate_doc(ret):
 retc = ret.copy()
 retc['_id'] = ret['jid']
 retc['timestamp'] = time.time()
 return retc

def _generate_doc ( ret ) : retc = ret . copy ( ) retc [ '_id' ] = ret [ 'jid' ] retc [ 'timestamp' ] = time . time ( ) return retc
create a object that will be saved into the database based on options .