code: def multitask_sequence_accuracy(*args) -> float:
      """
      Accuracy for multiple simultaneous sequence labeling (tagging) tasks.
      For each sequence the model checks whether all its elements
      are labeled correctly for all the individual taggers.
  
      Args:
          *args: a list of `2n` inputs. The first `n` inputs are the correct answers for `n` tasks,
              and the last `n` are the predicted ones. For each task an
  
      Returns:
          The percentage of sequences where all the items has correct answers for all `n` tasks.
  
      """
      n = len(args)
      y_true_by_tasks, y_predicted_by_tasks = (
          args[: n // 2],
          args[n // 2 :],
      )
      y_true_by_sents = list(zip(*y_true_by_tasks))
      y_predicted_by_sents = list(zip(*y_predicted_by_tasks))
      y_true = list(list(zip(*elem)) for elem in y_true_by_sents)
      y_predicted = list(
          list(zip(*elem)) for elem in y_predicted_by_sents
      )
      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 4 for calling a global function with example usage: multitask_sequence_accuracy() and returns: accuracy