def _check_results(native_results, faasm_results):
    """
    Check that both native and faasm experiments have:
    (1) Run with the same kernels
    (2) Run with the same number of processes
    """
    # If the two experiments recorded results for different kernels, error out
    if native_results.keys() != faasm_results.keys():
        print(
            "Kernels mismatch!\n - Native: {}\n - Faasm: {}".format(
                native_results.keys(), faasm_results.keys()
            )
        )
        return False

    # If the experiments run with different number of processes, error out
    for key in native_results.keys():
        if len(native_results[key]) != len(faasm_results[key]):
            print("Number of processes in kernel {} mismatch!".format(key))
            print(
                " - Native: {}\n - Faasm: {}".format(
                    native_results[key], faasm_results[key]
                )
            )
            return False

    return True