def predict(self, data_view_id, candidates, method="<STR_LIT>", use_prior=True):
uid = self.submit_predict_request(data_view_id, candidates, method, use_prior)<EOL>while self.check_predict_status(data_view_id, uid)['<STR_LIT:status>'] not in ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>time.sleep(<NUM_LIT:1>)<EOL><DEDENT>result = self.check_predict_status(data_view_id, uid)<EOL>if result["<STR_LIT:status>"] == "<STR_LIT>":<EOL><INDENT>paired = zip(result["<STR_LIT>"]["<STR_LIT>"], result["<STR_LIT>"]["<STR_LIT>"])<EOL>prediction_result_format = [{k: (p[<NUM_LIT:0>][k], p[<NUM_LIT:1>][k]) for k in p[<NUM_LIT:0>].keys()} for p in paired]<EOL>return list(map(<EOL>lambda c: _get_prediction_result_from_candidate(c), prediction_result_format<EOL>))<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError(<EOL>"<STR_LIT>".format(uid, result["<STR_LIT:status>"])<EOL>)<EOL><DEDENT>
Predict endpoint. This simply wraps the async methods (submit and poll for status/results).

:param data_view_id: The ID of the data view to use for prediction
:type data_view_id: str
:param candidates: A list of candidates to make predictions on
:type candidates: list of dicts
:param method: Method for propagating predictions through model graphs. "scalar" uses linearized uncertainty
propagation, whereas "scalar_from_distribution" still returns scalar predictions but uses sampling to
propagate uncertainty without a linear approximation.
:type method: str ("scalar" or "scalar_from_distribution")
:param use_prior:  Whether to apply prior values implied by the property descriptors
:type use_prior: bool
:return: The results of the prediction
:rtype: list of :class:`PredictionResult`