code: def _convert_metrics_to_numpy(
      metrics: Dict[str, Any]
  ) -> Dict[str, Any]:
      for metric_name, metric_val in metrics.items():
          if isinstance(metric_val, torch.Tensor):
              metrics[metric_name] = metric_val.cpu().numpy()
      return metrics
  
file_path: determined/harness/determined/pytorch/_metric_utils.py
imports: import logging
  from typing import Any, Dict, List, Optional, Tuple, Union, cast
  import numpy
  import torch
  import determined
  from determined import pytorch, util
label_desc: Use image node_id 6 for calling a global function with example usage: _convert_metrics_to_numpy(metrics) and returns: metrics