class_docstr: Task is the central place to define and wire up components for data processing,
  model training, metric reporting, etc. Task class has a Config class containing
  the config of each component in a descriptive way.
class_docstr_tok: ["Task","is","the","central","place","to","define","and","wire","up","components","for","data","processing",",","model","training",",","metric","reporting",",","etc",".","Task","class","has","a","Config","class","containing","the","config","of","each","component","in","a","descriptive","way","."]
docstr: Format the prediction and score from model output, by default just return
  them in a dict
docstr_tok: ["Format","the","prediction","and","score","from","model","output",",","by","default","just","return","them","in","a","dict"]
code: def format_prediction(cls, predictions, scores, context, target_meta):
      """
      Format the prediction and score from model output, by default just return
      them in a dict
      """
      for prediction, score in zip(predictions, scores):
          yield {"prediction": prediction, "score": score}
  
imports: from typing import List, Optional
  from pytext.common.constants import BatchContext
  from pytext.config import ConfigBase
  from pytext.config.component import Component, ComponentType, create_component, create_data_handler, create_exporter, create_featurizer, create_metric_reporter, create_model, create_trainer
  from pytext.config.field_config import FeatureConfig
  from pytext.data import DataHandler
  from pytext.data.featurizer import Featurizer, SimpleFeaturizer
  from pytext.exporters import ModelExporter
  from pytext.loss import KLDivergenceBCELoss, KLDivergenceCELoss
  from pytext.metric_reporters import MetricReporter
  from pytext.models import Model
  from pytext.trainers import Trainer
  from pytext.utils import cuda
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 6 for calling the TaskBase obj's underlying member method code with example usage: obj.format_prediction(cls, predictions, scores, context, target_meta) without return types