<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def predict(model_dir, images):
 """Local instant prediction."""


  results = _tf_predict(model_dir, images)
  predicted_and_scores = [(predicted, label_scores[list(labels).index(predicted)])
                          for predicted, labels, label_scores in results]
  return predicted_and_scores