def are_elements_equal(expected, actual, comparer=None, message=None):
    is_ok = True
    comparer = comparer or default_comparer
    if len(expected) != len(actual):
        msg = 'Not equal length. Expected: %s Actual: %s' % (len(expected), len(actual))
        assert False, msg
        return

    for i, ex in enumerate(expected):
        is_ok = comparer(ex, actual[i])
        if not is_ok:
            break

    assert is_ok, message or create_message(actual, expected)
dataset/ETHPy150Open ReactiveX/RxPY/rx/testing/reactive_assert.py/are_elements_equal/original