original_docstring: 
      Query and download the paras file of local model trained by the device.
      
docstring: Query and download the paras file of local model trained by the device.
docstring_tokens: Query and download the paras file of local model trained by the device .
code: def queryLocal(lock, taskID, deviceID, currentEpoch, flagSet, localFileName):
      """
      Query and download the paras file of local model trained by the device.
      """
      localQuery = subprocess.Popen(args=['../commonComponent/interRun.sh query '+deviceID], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8')
      outs, errs = localQuery.communicate(timeout=15)
      if localQuery.poll() == 0:
          localDetail = json.loads(outs.strip())
          if localDetail['epoch'] == currentEpoch and localDetail['taskID'] == taskID:
              print("The query result of the " + deviceID + " is ", outs.strip())
              while 1:
                  # localFileName = './clientS/paras/' + taskID + '-' + deviceID + '-epoch-' + str(currentEpoch) + '.pkl'
                  outs, stt = ipfsGetFile(localDetail['paras'], localFileName)
                  if stt == 0:
                      break
                  # else:
                  #     print(outs.strip())
              lock.acquire()
              t1 = flagSet
              t1.add(deviceID)
              flagSet = t1
              lock.release()
          # else:
          #     print('*** This device %s has not updated its model! ***'%(deviceID))
      # else:
      #     print("Failed to query this device!", errs)
  
code_tokens: def queryLocal ( lock , taskID , deviceID , currentEpoch , flagSet , localFileName ) : localQuery = subprocess . Popen ( args = [ '../commonComponent/interRun.sh query ' + deviceID ] , shell = True , stdout = subprocess . PIPE , stderr = subprocess . PIPE , encoding = 'utf-8' ) outs , errs = localQuery . communicate ( timeout = 15 ) if localQuery . poll ( ) == 0 : localDetail = json . loads ( outs . strip ( ) ) if localDetail [ 'epoch' ] == currentEpoch and localDetail [ 'taskID' ] == taskID : print ( "The query result of the " + deviceID + " is " , outs . strip ( ) ) while 1 : outs , stt = ipfsGetFile ( localDetail [ 'paras' ] , localFileName ) if stt == 0 : break lock . acquire ( ) t1 = flagSet t1 . add ( deviceID ) flagSet = t1 lock . release ( )
short_docstring: Query and download the paras file of local model trained by the device.
short_docstring_tokens: Query and download the paras file of local model trained by the device .
comment: """
      Query and download the paras file of local model trained by the device.
      """$SEP$# localFileName = './clientS/paras/' + taskID + '-' + deviceID + '-epoch-' + str(currentEpoch) + '.pkl'
  $SEP$# else:
  $SEP$#     print(outs.strip())
  $SEP$# else:
  $SEP$#     print('*** This device %s has not updated its model! ***'%(deviceID))
  $SEP$# else:
  $SEP$#     print("Failed to query this device!", errs)
  