def METHOD_NAME(data_merged, rangeindexed):
    """
    Test that DataSet is unchanged by roundtrip call of DataSet.unstack_anomalous()
    followed by DataSet.stack_anomalous()
    """
    if rangeindexed:
        data = data_merged.reset_index()
    else:
        data = data_merged
    stacked = data.stack_anomalous()
    unstacked = stacked.unstack_anomalous(["I", "SIGI", "N"])
    result = unstacked.stack_anomalous()
    # Re-order columns if needed
    result = result[stacked.columns]
    assert_frame_equal(result, stacked, check_index_type=False)
    assert result._index_dtypes == stacked._index_dtypes