def METHOD_NAME(results, expected_results):
    assert results.analysis_type is not None
    assert results.analysis_type == expected_results.analysis_type
    if results.attributes:
        # model attributes
        assert set(results.attributes.keys()) == set(expected_results.attributes.keys())
        for key, value in results.attributes.items():
            if key == "num_cores":
                continue  # different systems may have different number of cores
            assert value == expected_results.attributes[key]
    if results.value is not None:
        # model level results
        assert expected_results.value is not None
        assert isinstance(results.value, dict)
        assert set(results.value.keys()) == set(expected_results.value.keys())
    # model layer results
    assert set(results.layer_results.keys()) == set(
        expected_results.layer_results.keys()
    )
    for layer, layer_results in results.layer_results.items():
        layer_results = layer_results.value
        expected_layer_results = expected_results.layer_results[layer].value
        assert set(layer_results.keys()) == set(expected_layer_results.keys())
        if results.analysis_type == PruningSensitivityResultTypes.PERF.value:
            # skip perf comparisons since tests may be run across systems
            continue
        for sparsity, sensitivity in layer_results.items():
            assert abs(sensitivity - expected_layer_results[sparsity]) < 5e-4