code: def check_equal_metadata(
      self,
      actual_meta: List[Dict[str, Any]],
      expected_meta: List[Dict[str, Any]],
      exclude_keys: Optional[List[str]],
  ):
      if actual_meta == expected_meta:
          return
  
      for actual_dict, expected_dict in zip(actual_meta, expected_meta):
          for (act_k, act_v), (exp_k, exp_v) in zip(
              sorted(actual_dict.items(), key=lambda kv: kv[0]),
              sorted(expected_dict.items(), key=lambda kv: kv[0]),
          ):
              if exclude_keys is not None and act_k in exclude_keys:
                  continue
  
              if act_k != exp_k:
                  self.assertEqual(
                      act_k,
                      exp_k,
                      f"Actual_dict={actual_dict}",
                  )
  
              if act_v == exp_v:
                  continue
  
              """
                  Allow relative paths in expected metadata: just check that the end of the
                  actual path matches the expected path
                  """
              condition = (
                  lambda actual, expected: isinstance(actual, str)
                  and isinstance(expected, str)
                  and actual[-len(expected) :] == expected
              )
  
              if isinstance(act_v, list) and isinstance(exp_v, list):
                  for actual_path, expected_path in zip(act_v, exp_v):
                      self.assertTrue(
                          condition(actual_path, expected_path),
                          f"Error comparing list values: actual_path={actual_path}, expected_path={expected_path}, actual_metadata={actual_meta}.",
                      )
                      if not condition(actual_path, expected_path):
                          return False
              elif isinstance(act_v, float) and isinstance(
                  act_v, float
              ):
                  self.assertAlmostEqual(
                      act_v,
                      exp_v,
                      places=3,
                      msg=f"Error comparing values: actual={act_v}, expected={exp_v}, actual_metadata={actual_meta}.",
                  )
              else:
                  self.assertTrue(
                      condition(act_v, exp_v),
                      f"Error comparing values: actual={act_v}, expected={exp_v}, actual_metadata={actual_meta}.",
                  )
  
file_path: AugLy/augly/tests/video_tests/base_unit_test.py
imports: import filecmp
  import os
  import tempfile
  import unittest
  from typing import Any, Callable, Dict, List, Optional, Tuple
  from augly.tests import VideoAugConfig
  from augly.utils import pathmgr, TEST_URI
label_desc: Use image node_id 1 for calling the BaseVideoUnitTest obj's underlying member method code with example usage: obj.check_equal_metadata(actual_meta, expected_meta, exclude_keys) and returns: False