code: def test_multitasking_metrics_micro(self):
      valid, test = testing_utils.train_model(
          {
              "task": "integration_tests:candidate,"
              "integration_tests:multiturnCandidate",
              "model": "random_candidate",
              "num_epochs": 0.5,
              "aggregate_micro": True,
          }
      )
  
      task1_acc = valid["integration_tests:candidate/accuracy"]
      task2_acc = valid["integration_tests:multiturnCandidate/accuracy"]
      total_acc = valid["accuracy"]
      self.assertEqual(
          total_acc,
          task1_acc + task2_acc,
          "Task accuracy is averaged incorrectly",
      )
  
      valid, test = testing_utils.train_model(
          {
              "task": "integration_tests:candidate,"
              "integration_tests:multiturnCandidate",
              "model": "random_candidate",
              "num_epochs": 0.5,
              "aggregate_micro": True,
          }
      )
      task1_acc = valid["integration_tests:candidate/accuracy"]
      task2_acc = valid["integration_tests:multiturnCandidate/accuracy"]
      total_acc = valid["accuracy"]
      # metrics should be averaged equally across tasks
      self.assertEqual(
          total_acc,
          task1_acc + task2_acc,
          "Task accuracy is averaged incorrectly",
      )
  
imports: import os
  import unittest
  import json
  import parlai.utils.logging
  import parlai.utils.testing
  from parlai.utils.io import PathManager
  from parlai.core.metrics import AverageMetric
  from parlai.core.worlds import create_task
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.agents import register_agent, Agent
  from parlai.scripts.eval_model import get_task_world_logs
label_desc: Use image node_id 3 for calling the TestTrainModel obj's underlying member method code with example usage: obj.test_multitasking_metrics_micro() without return types