def METHOD_NAME(path, source, reference):
    """
    Compare two dictionary of a topology
    """
    assert isinstance(source, dict), "Source is not a dict in {}".format(path)
    for key in source:
        assert key in reference, "Unexpected {} in {} it should be {}".format(key, source, reference)
    for key in sorted(reference.keys()):
        val = reference[key]
        assert key in source, "{} is missing in {}".format(key, source)
        if isinstance(val, str) or isinstance(val, float) or isinstance(val, int) or isinstance(val, bool) or val is None:
            if val == "ANYSTR":
                pass
            elif val == "ANYUUID" and len(source[key]) == 36:
                pass
            # We test that the revision number has been bumped to last version. This avoid modifying all the tests
            # at each new revision bump.
            elif key == "revision":
                assert source[key] == GNS3_FILE_FORMAT_REVISION
            elif key == "version":
                assert source[key] == __version__
            else:
                assert val == source[key], "Wrong value for {}: \n{}\nit should be\n{}".format(key, source[key], val)
        elif isinstance(val, dict):
            METHOD_NAME(path + key + "/", source[key], val)
        elif isinstance(val, list):
            assert len(val) == len(source[key]), "Not enough value in {} ({}/{}) it shoud be {} not {}".format(key, len(val), len(source[key]), val, source[key])
            for idx, element in enumerate(source[key]):
                if isinstance(element, dict):
                    METHOD_NAME(path + key + "/", element, val[idx])
                else:
                    assert element == val[idx]
        else:
            assert False, "Value type for {} is not supported".format(key)