nodes: 0, module; 1, function_definition; 2, function_name:run; 3, parameters; 4, block; 5, identifier:self; 6, identifier:clf; 7, expression_statement; 8, expression_statement; 9, if_statement; 10, return_statement; 11, comment:"""Run correlation-based voxel selection in master-worker model.
  
          Sort the voxels based on the cross-validation accuracy
          of their correlation vectors
  
          Parameters
          ----------
          clf: classification function
              the classifier to be used in cross validation
  
          Returns
          -------
          results: list of tuple (voxel_id, accuracy)
              the accuracy numbers of all voxels, in accuracy descending order
              the length of array equals the number of voxels
          """; 12, assignment; 13, comparison_operator:rank == self.master_rank; 14, block; 15, else_clause; 16, identifier:results; 17, identifier:rank; 18, call; 19, identifier:rank; 20, attribute; 21, expression_statement; 22, comment:# Sort the voxels; 23, expression_statement; 24, block; 25, attribute; 26, argument_list; 27, identifier:self; 28, identifier:master_rank; 29, assignment; 30, call; 31, expression_statement; 32, expression_statement; 33, attribute; 34, identifier:Get_rank; 35, identifier:results; 36, call; 37, attribute; 38, argument_list; 39, call; 40, assignment; 41, identifier:MPI; 42, identifier:COMM_WORLD; 43, attribute; 44, argument_list; 45, identifier:results; 46, identifier:sort; 47, keyword_argument; 48, keyword_argument; 49, attribute; 50, argument_list; 51, identifier:results; 52, list; 53, identifier:self; 54, identifier:_master; 55, identifier:key; 56, lambda; 57, identifier:reverse; 58, True; 59, identifier:self; 60, identifier:_worker; 61, identifier:clf; 62, lambda_parameters; 63, subscript; 64, identifier:tup; 65, identifier:tup; 66, integer:1
code: def run(self, clf):
          """Run correlation-based voxel selection in master-worker model.
  
          Sort the voxels based on the cross-validation accuracy
          of their correlation vectors
  
          Parameters
          ----------
          clf: classification function
              the classifier to be used in cross validation
  
          Returns
          -------
          results: list of tuple (voxel_id, accuracy)
              the accuracy numbers of all voxels, in accuracy descending order
              the length of array equals the number of voxels
          """
          rank = MPI.COMM_WORLD.Get_rank()
          if rank == self.master_rank:
              results = self._master()
              # Sort the voxels
              results.sort(key=lambda tup: tup[1], reverse=True)
          else:
              self._worker(clf)
              results = []
          return results