code: def initialize_trainer_metric_dict(
      output_features,
  ) -> Dict[str, Dict[str, List[TrainerMetric]]]:
      """Returns a dict of dict of metrics, output_feature_name -> metric_name -> List[TrainerMetric]."""
      metrics = defaultdict(lambda: defaultdict(list))
      return metrics
  
imports: import logging
  from collections import defaultdict
  from typing import Dict, List, Tuple, TYPE_CHECKING
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import AUTO, COMBINED, LOSS
  from ludwig.models.base import BaseModel
  from ludwig.modules.metric_modules import get_best_function
  from ludwig.utils.data_utils import save_json
  from ludwig.utils.metric_utils import TrainerMetric
label_desc: Use image node_id 1 for calling a global function with example usage: initialize_trainer_metric_dict(output_features) and returns: metrics