code: def slots_accuracy(y_true, y_predicted):
      y_true = [
          {tag.split("-")[-1] for tag in s if tag != "O"}
          for s in y_true
      ]
      y_predicted = [set(s.keys()) for s in y_predicted]
      return accuracy(y_true, y_predicted)
  
file_path: DeepPavlov/deeppavlov/metrics/accuracy.py
imports: import itertools
  import re
  from logging import getLogger
  from typing import List
  import numpy
  from deeppavlov.core.common.metrics_registry import register_metric
label_desc: Use image node_id 7 for calling a global function with example usage: slots_accuracy(y_true, y_predicted) and returns: accuracy