code: def process_batch_results(cls, texts, results, labels_count=None):
      processed_results = []
      for i, result in enumerate(results):
          processed = OrderedDict()
          processed["text"] = texts[i]
          result = result[:labels_count] if labels_count else result
          for index, label in enumerate(result):
              processed["label_{}".format(index + 1)] = label[0]
              processed["confidence_{}".format(index + 1)] = label[1]
          processed_results.append(processed)
  
      return processed_results
  
imports: import os
  import io
  import json
  import pickle
  import sys
  import signal
  import traceback
  import re
  import flask
  import pandas
  import torch
  from collections import OrderedDict
  from fast_bert.prediction import BertClassificationPredictor
  from fast_bert.utils.spellcheck import BingSpellCheck
  from pathlib import Path
  import warnings
label_desc: Use image node_id 5 for calling the ScoringService obj's underlying member method code with example usage: obj.process_batch_results(cls, texts, results, labels_count) and returns: processed_results