code: def __call__(self, pred_label, *args, **kwargs):
      preds, labels = pred_label
      correct_num = 0
      all_num = 0
      norm_edit_dis = 0.0
      for (pred, pred_conf), (target, _) in zip(preds, labels):
          if self.ignore_space:
              pred = pred.replace(" ", "")
              target = target.replace(" ", "")
          if self.is_filter:
              pred = self._normalize_text(pred)
              target = self._normalize_text(target)
          norm_edit_dis += Levenshtein.normalized_distance(pred, target)
          if pred == target:
              correct_num += 1
          all_num += 1
      self.correct_num += correct_num
      self.all_num += all_num
      self.norm_edit_dis += norm_edit_dis
      return {
          "acc": correct_num / (all_num + self.eps),
          "norm_edit_dis": 1 - norm_edit_dis / (all_num + self.eps),
      }
  
imports: from rapidfuzz.distance import Levenshtein
  from difflib import SequenceMatcher
  import numpy
  import string
label_desc: Use image node_id 3 for calling the RecMetric obj's underlying member method code with example usage: obj.__call__(pred_label) and returns: dict