def METHOD_NAME(a, b):
    mismatch = get_first_structural_mismatch(a, b)
    mismatch_swapped = get_first_structural_mismatch(b, a)
    if mismatch is None and mismatch_swapped is None:
        return None
    if (
        mismatch is None
        or mismatch_swapped is None
        or mismatch[0] != mismatch_swapped[1]
        or mismatch[1] != mismatch_swapped[0]
    ):
        raise AssertionError(
            "get_first_structural_mismatch(a, b) and get_first_structural_mismatch(b, a) returned"
            " inconsistent results '{}' and '{}' for a='{}', b='{}'".format(
                mismatch, mismatch_swapped, a, b
            )
        )
    a_path, b_path = mismatch
    b_path_swapped, a_path_swapped = mismatch_swapped
    assert a_path == a_path_swapped
    assert b_path == b_path_swapped
    return mismatch