code: def approx_eq_dict_in(actual: Dict, expected: Dict, e: int) -> bool:
      """Check if two dict are approximately similar (with error allowed)"""
      assert set(actual.keys()) == set(
          expected.keys()
      ), "Unequal key sets."
  
      for k, actual_v in actual.items():
          expect_v = expected[k]
          assert (
              abs(expect_v - actual_v) <= e
          ), f"expect={expect_v}, actual={actual_v}, diff allowed={e}"
  
      return True
  
file_path: ray/python/ray/tests/test_object_store_metrics.py
imports: from collections import defaultdict
  import pytest
  from typing import Dict
  import numpy
  import sys
  import requests
  import ray
  from ray._private.test_utils import raw_metrics, wait_for_condition
  from ray._private.worker import RayContext
label_desc: Use image node_id 4 for calling a global function with example usage: approx_eq_dict_in(actual, expected, e) and returns: True