code: def assert_dataclasses_are_equal(
      test: parameterized.TestCase, expected, actual, delta=1e-5
  ):
      """Asserts that input dataclasses are equal to one another.
  
      Only supports dataclasses with the following fields:
      - int
      - float
      - List[int]
      - List[float]
      - enum
  
      For floats, it uses approximate equality with given delta (defaults to 1e-5).
      """
      test.assertEqual(
          type(expected),
          type(actual),
          msg=f"expected={type(expected)} and actual={type(actual)}"
          f"need to be the same type",
      )
      expected = dataclasses.asdict(expected)
      actual = dataclasses.asdict(actual)
      assert_dictionaries_are_equal(test, expected, actual, delta)
  
imports: import dataclasses
  import enum
  import typing
  from absl.testing import parameterized
label_desc: Use image node_id 1 for calling a global function with example usage: assert_dataclasses_are_equal(test, expected, actual, delta) without return types