code: def are_dicts_equal(
      expected_dict: Mapping[Any, Any],
      actual_dict: Mapping[Any, Any],
      epsilon: float,
  ) -> Tuple[bool, str]:
      def _are_same(
          expected: Any, actual: Any, key: str
      ) -> Tuple[bool, str]:
          if type(expected) != type(actual):
              return (
                  False,
                  f"Key '{key}' type mismatch. Expected: '{type(expected)}', but found: '{type(actual)}'",
              )
          elif type(expected) == type(None):
              return True, ""
          elif isinstance(expected, (int, bool, str)):
              return (
                  expected == actual,
                  f"Key '{key}' value mismatch. Expected: '{expected}', but found: '{actual}'"
                  if expected != actual
                  else "",
              )
          elif isinstance(expected, (float)):
              delta = abs(expected - actual)
              return (
                  delta < epsilon,
                  f"Key '{key}' value mismatch. Expected: '{expected}', but found: '{actual}' (using epsilon: '{epsilon}')"
                  if delta >= epsilon
                  else "",
              )
          elif isinstance(expected, dict):
              expected_keys = set(expected.keys())
              actual_keys = set(actual.keys())
              if expected_keys != actual_keys:
                  return (
                      False,
                      f"Key '{key}' keys mismatch. Expected: {expected_keys.difference(actual_keys)}. Found but not expected: {actual_keys.difference(expected_keys)}",
                  )
              for key in expected_keys:
                  are_same, reason = _are_same(
                      expected[key], actual[key], f"{key}"
                  )
                  if not are_same:
                      return False, reason
              return True, ""
          elif isinstance(expected, list):
              if len(expected) != len(actual):
                  return (
                      False,
                      f"Key '{key}' length mismatch. Expected: '{len(expected)}', but found: '{len(actual)}'",
                  )
              for i in range(len(expected)):
                  are_same, reason = _are_same(
                      expected[i], actual[i], f"{key}[{i}]"
                  )
                  if not are_same:
                      return False, reason
              return True, ""
          else:
              raise TypeError(
                  f"Type {type(expected)} not supported in are_dicts_equal"
              )
  
      return _are_same(expected_dict, actual_dict, "root")
  
imports: import shutil
  import threading
  import argparse
  import difflib
  from pathlib import Path
  import re
  import os
  import subprocess
  import sys
  import traceback
  import shlex
  import math
  import json
  from concurrent.futures import ThreadPoolExecutor, Future
  from enum import Enum
  import socket
  from typing import Any, Callable, Dict, List, Mapping, Optional, Set, Tuple, Type, Union, cast
  from run_tests_common import TestData
  import runtests_flatbuffer_converter
label_desc: Use image node_id 1 for calling a global function with example usage: are_dicts_equal(expected_dict, actual_dict, epsilon) and returns: _are_same, False,  str, key, str, type, str, type, str, True,  str, unknown,  unknown, unknown,  unknown, True,  str, False,  str, key, str, expected_keys, str, actual_keys, True,  str, False,  reason, False,  str, key, str, len, str, len, str, False,  reason