code: def compute_aggregate_major_metrics_from_results_dict(
      metrics_aggregator, results_dict
  ):
      major_metrics_dict = {
          task_name: results["metrics"].major
          for task_name, results in results_dict.items()
      }
      return metrics_aggregator.aggregate(
          major_metrics_dict=major_metrics_dict
      )
  
imports: import abc
  import numexpr
  import numpy
  from typing import Union, Optional, Dict
label_desc: Use image node_id 3 for calling a global function with example usage: compute_aggregate_major_metrics_from_results_dict(metrics_aggregator, results_dict) and returns: metrics_aggregator