class_docstr: interface to Sentiment Analyzer
docstr: ```
  flatten prediction to the form {'label':score}
  ```
code: def _flatten_prediction(self, prediction: list):
      """
      ```
      flatten prediction to the form {'label':score}
      ```
      """
      return_dict = {}
      for d in prediction:
          return_dict[self.mapping[d["label"]]] = d["score"]
      return return_dict
  
file_path: ktrain/ktrain/text/sentiment/core.py
imports: from typing import Union
  from transformers import pipeline
  from ...None import utils
  from ...torch_base import TorchBase
label_desc: Use image node_id 3 for calling the SentimentAnalyzer obj's underlying member method code with example usage: obj._flatten_prediction(prediction) and returns: return_dict