code: def test_parse_metrics_line(line_num, line, expected_metrics):
      if line_num == int(line.split("\t")[0]):
          parsed_metrics = utils.parse_metrics_line(line_num, line)
          for k, v in parsed_metrics.items():
              assert isinstance(v, type(expected_metrics[k]))
              assert v == expected_metrics[k]
      else:
          with pytest.raises(utils.SockeyeError) as e:
              utils.parse_metrics_line(line_num, line)
  
imports: import gzip
  import math
  import os
  import re
  from tempfile import TemporaryDirectory
  import unittest
  import numpy
  import pytest
  import torch
  from sockeye import __version__
  from sockeye import constants
  from sockeye import utils
label_desc: Use image node_id 19 for calling a global function with example usage: test_parse_metrics_line(line_num, line, expected_metrics) without return types