code: def assert_equivalent_metrics(
      metrics_A: Dict[str, Any], metrics_B: Dict[str, Any]
  ) -> None:
      """
      Helper function to verify that two dictionaries of metrics are equivalent
      to each other.
      """
      assert set(metrics_A.keys()) == set(metrics_B.keys())
      for key in metrics_A.keys():
          if isinstance(metrics_A[key], (float, np.float64)):
              assert metrics_A[key] == pytest.approx(metrics_B[key])
          elif isinstance(metrics_A[key], np.ndarray):
              assert np.array_equal(metrics_A[key], metrics_B[key])
          else:
              assert metrics_A[key] == metrics_B[key]
  
imports: import importlib
  import os
  import pathlib
  import re
  import unittest.mock
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Type
  import numpy
  import pytest
  from mypy_extensions import DefaultNamedArg
  import determined
  from determined import core, gpu, workload
  from determined.common import util
label_desc: Use image node_id 10 for calling a global function with example usage: assert_equivalent_metrics(metrics_A, metrics_B) without return types