code: def get_metrics(cfg: AudioEvaluationConfig):
      """Prepare a dictionary with metrics."""
      available_metrics = ["sdr", "sisdr", "stoi", "estoi", "pesq"]
  
      metrics = dict()
      for name in sorted(set(cfg.metrics)):
          name = name.lower()
          if name == "sdr":
              metric = AudioMetricWrapper(
                  metric=SignalDistortionRatio()
              )
          elif name == "sisdr":
              metric = AudioMetricWrapper(
                  metric=ScaleInvariantSignalDistortionRatio()
              )
          elif name == "stoi":
              metric = AudioMetricWrapper(
                  metric=ShortTimeObjectiveIntelligibility(
                      fs=cfg.sample_rate, extended=False
                  )
              )
          elif name == "estoi":
              metric = AudioMetricWrapper(
                  metric=ShortTimeObjectiveIntelligibility(
                      fs=cfg.sample_rate, extended=True
                  )
              )
          elif name == "pesq":
              metric = AudioMetricWrapper(
                  metric=PerceptualEvaluationSpeechQuality(
                      fs=cfg.sample_rate, mode="wb"
                  )
              )
          else:
              raise ValueError(
                  f"Unexpected metric: {name}. Currently available metrics: {available_metrics}"
              )
  
          metrics[name] = metric
  
      return metrics
  
imports: import json
  import os
  import tempfile
  from dataclasses import dataclass, field, is_dataclass
  from typing import List, Optional
  import process_audio
  import torch
  from omegaconf import OmegaConf, open_dict
  from torchmetrics.audio.pesq import PerceptualEvaluationSpeechQuality
  from torchmetrics.audio.sdr import ScaleInvariantSignalDistortionRatio, SignalDistortionRatio
  from torchmetrics.audio.stoi import ShortTimeObjectiveIntelligibility
  from tqdm import tqdm
  from nemo.collections.asr.data import audio_to_audio_dataset
  from nemo.collections.asr.metrics.audio import AudioMetricWrapper
  from nemo.collections.common.parts.preprocessing import manifest
  from nemo.core.config import hydra_runner
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: get_metrics(cfg) and returns: metrics