def getUnpackNextCode(to_name, value, expected, count, emit, context):
    if python_version < 350:
        emit(
            "%s = UNPACK_NEXT( %s, %s );" % (
                to_name,
                value,
                count - 1
            )
        )
    else:
        emit(
            "%s = UNPACK_NEXT( %s, %s, %s );" % (
                to_name,
                value,
                count - 1,
                expected
            )
        )

    getErrorExitCode(
        check_name      = to_name,
        quick_exception = "StopIteration",
        emit            = emit,
        context         = context
    )

    getReleaseCode(
        release_name = value,
        emit         = emit,
        context      = context
    )

    context.addCleanupTempName(to_name)
dataset/ETHPy150Open kayhayen/Nuitka/nuitka/codegen/IteratorCodes.py/getUnpackNextCode/original