def assert_sp_panel_equal(left, right, exact_indices=True):
    assertIsInstance(left, pd.SparsePanel, '[SparsePanel]')
    assertIsInstance(right, pd.SparsePanel, '[SparsePanel]')

    for item, frame in left.iteritems():
        assert (item in right)
        # trade-off?
        assert_sp_frame_equal(frame, right[item], exact_indices=exact_indices)

    assert_almost_equal(left.default_fill_value, right.default_fill_value)
    assert (left.default_kind == right.default_kind)

    for item in right:
        assert (left in item)
dataset/ETHPy150Open pydata/pandas/pandas/util/testing.py/assert_sp_panel_equal/swapped operands of `in`