code: def _init_metrics(
      dataset_names: List[str],
      crps: Metric,
      crps_scaled: Optional[Metric] = None,
  ):
      n_datasets = len(dataset_names)
      crps = nn.ModuleList([crps.clone() for _ in range(n_datasets)])
      macro_crps = sum(crps) / len(crps)
      if crps_scaled:
          crps_scaled = nn.ModuleList(
              [crps_scaled.clone() for _ in range(n_datasets)]
          )
          macro_crps_scaled = sum(crps_scaled) / len(crps_scaled)
      return (
          crps,
          macro_crps,
          crps_scaled,
          macro_crps_scaled if crps_scaled else None,
      )
  
file_path: gluonts/src/gluonts/nursery/few_shot_prediction/src/meta/models/module.py
imports: from typing import Any, Dict, Optional, List
  import pytorch_lightning
  import torch
  import torch.optim
  from torch import nn
  from torchmetrics import Metric
  from torch.optim.lr_scheduler import ReduceLROnPlateau
  from meta.data.batch import TripletBatch
  from meta.models.model import MetaModel
  from meta.common.torch import get_mask
label_desc: Use image node_id 1 for calling a global function with example usage: _init_metrics(dataset_names, crps, crps_scaled) and returns: crps,  macro_crps,  crps_scaled,  unknown