code: def compare(results, expected, file, prev_path=None):
      assert isinstance(results, dict)
      missing_keys = set(expected.keys()) - set(results)
      assert not missing_keys, "Missing data in fixture \n%s" % str(
          missing_keys
      )
  
      for key, result_val in results.items():
          path = prev_path + "." + key if prev_path else key
          try:
              expected_val = expected[key]
          except KeyError:
              assert (
                  False
              ), 'Missing field "%s": "%s" in fixture "%s"!' % (
                  key,
                  error_fmt(result_val),
                  file,
              )
          # recurse if the result and expected values are a dict:
          if isinstance(result_val, dict) and isinstance(
              expected_val, dict
          ):
              compare(result_val, expected_val, file, prev_path=key)
          else:
              fmt_string = 'field "%s": got %s expected %s in %s!'
              fmt_values = (
                  key,
                  error_fmt(result_val),
                  error_fmt(expected_val),
                  file,
              )
              op = operator.eq
              if (
                  path == "duration"
              ):  # allow duration to be off by 100 ms and a maximum of 1%
                  op = almost_equal_float
              if (
                  path == "extra.lyrics"
              ):  # lets not copy *all* the lyrics inside the fixture
                  op = startswith
              assert op(result_val, expected_val), (
                  fmt_string % fmt_values
              )
  
imports: from __future__ import unicode_literals
  import io
  import operator
  import os
  import re
  import shutil
  import sys
  import pytest
  from pytest import raises
  from tinytag.tinytag import TinyTag, TinyTagException, ID3, Ogg, Wave, Flac, Wma, MP4, Aiff
label_desc: Use image node_id 5 for calling a global function with example usage: compare(results, expected, file, prev_path) without return types