code: def are_floats_equal(
      float_one_str: str, float_two_str: str, epsilon: float
  ) -> bool:
      float_one = float(float_one_str)
      float_two = float(float_two_str)
  
      # Special case handle these two as they will not be equal when checking absolute difference.
      # But for the purposes of comparing the diff they are equal.
      if math.isinf(float_one) and math.isinf(float_two):
          return True
      if math.isnan(float_one) and math.isnan(float_two):
          return True
  
      delta = abs(float_one - float_two)
      if delta < epsilon:
          return True
  
      # Large number comparison code migrated from Perl RunTests
  
      # We have a 'big enough' difference, but this difference
      # may still not be meaningful in all contexts. Big numbers should be compared by ratio rather than
      # by difference
  
      # Must ensure we can divide (avoid div-by-0)
      # If numbers are so small (close to zero),
      # ($delta > $Epsilon) suffices for deciding that
      # the numbers are meaningfully different
      if abs(float_two) <= 1.0:
          return False
  
      # Now we can safely divide (since abs($word2) > 0) and determine the ratio difference from 1.0
      ratio_delta = abs(float_one / float_two - 1.0)
      return ratio_delta < epsilon
  
file_path: vowpal_wabbit/python/tests/test_cb.py
imports: import pandas
  from os import path
  import vowpalwabbit
  import unittest
  import platform
  import math
  import re
label_desc: Use image node_id 5 for calling a global function with example usage: are_floats_equal(float_one_str, float_two_str, epsilon) and returns: unknown, True, True, True, False