code: def multitask_accuracy(*args) -> float:
      """
      Accuracy for multiple simultaneous tasks.
  
      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.
  
      Returns:
          The percentage of inputs where the answers for all `n` tasks are correct.
      """
      n = len(args)
      y_true_by_tasks, y_predicted_by_tasks = (
          args[: n // 2],
          args[n // 2 :],
      )
      answers = []
      for true, pred in zip(y_true_by_tasks, y_predicted_by_tasks):
          answers.append(accuracy(true, pred))
      final_answer = sum(answers) / len(answers)
      return final_answer
  
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 3 for calling a global function with example usage: multitask_accuracy() and returns: final_answer