class_docstr: Tree Edit Distance basead Similarity
      
class_docstr_tok: ["Tree","Edit","Distance","basead","Similarity"]
docstr: Computes TEDS score between the prediction and the ground truth of
  a batch of samples
  @params pred_json: {'FILENAME': 'HTML CODE', ...}
  @params true_json: {'FILENAME': {'html': 'HTML CODE'}, ...}
  @output: {'FILENAME': 'TEDS SCORE', ...}
docstr_tok: ["Computes","TEDS","score","between","the","prediction","and","the","ground","truth","of","a","batch","of","samples","@","params","pred_json",":","{","'FILENAME","'",":","'HTML","CODE","'",",","...","}","@","params","true_json",":","{","'FILENAME","'",":","{","'html","'",":","'HTML","CODE","'","}",",","...","}","@","output",":","{","'FILENAME","'",":","'TEDS","SCORE","'",",","...","}"]
code: def batch_evaluate(self, pred_json, true_json):
      """Computes TEDS score between the prediction and the ground truth of
      a batch of samples
      @params pred_json: {'FILENAME': 'HTML CODE', ...}
      @params true_json: {'FILENAME': {'html': 'HTML CODE'}, ...}
      @output: {'FILENAME': 'TEDS SCORE', ...}
      """
      samples = true_json.keys()
      if self.n_jobs == 1:
          scores = [
              self.evaluate(
                  pred_json.get(filename, ""),
                  true_json[filename]["html"],
              )
              for filename in tqdm(samples)
          ]
      else:
          inputs = [
              {
                  "pred": pred_json.get(filename, ""),
                  "true": true_json[filename]["html"],
              }
              for filename in samples
          ]
          scores = parallel_process(
              inputs,
              self.evaluate,
              use_kwargs=True,
              n_jobs=self.n_jobs,
              front_num=1,
          )
      scores = dict(zip(samples, scores))
      return scores
  
imports: from rapidfuzz.distance import Levenshtein
  from apted import APTED, Config
  from apted.helpers import Tree
  from lxml import etree, html
  from collections import deque
  from .parallel import parallel_process
  from tqdm import tqdm
label_desc: Use image node_id 5 for calling the TEDS obj's underlying member method code with example usage: obj.batch_evaluate(pred_json, true_json) and returns: scores