human
Solve the following python programming problem given the following code:
def _emit_update_statements(base_mapper, uowtransaction, cached_connections, mapper, table, update, bookkeeping = True) : 
    'Emit UPDATE statements corresponding to value lists collected
    by _collect_update_commands().' 
    needs_version_id = ((mapper.version_id_col is not None) and (mapper.version_id_col in mapper._cols_by_table [table])) 
    def update_stmt() : 
        clause = sql.and_ () 
        for col in mapper._pks_by_table [table] : 
            clause.clauses.append ((col == sql.bindparam (col._label, type_ = col.type))) 
if needs_version_id : 
            clause.clauses.append ((mapper.version_id_col == sql.bindparam (mapper.version_id_col._label, type_ = mapper.version_id_col.type))) 
stmt = table.update (clause) 
        return stmt 
cached_stmt = base_mapper._memo (('update', table), update_stmt) 
    for ((connection, paramkeys, hasvalue, has_all_defaults), records) in groupby (update, (lambda rec : (rec [4], set (rec [2]), bool (rec [5]), rec [6]))) : 
        rows = 0 
        records = list (records) 
        statement = cached_stmt 
        assert_singlerow = connection.dialect.supports_sane_rowcount 
        assert_multirow = (assert_singlerow and connection.dialect.supports_sane_multi_rowcount) 
        allow_multirow = (has_all_defaults and (not needs_version_id)) 
        if (bookkeeping and (not has_all_defaults) and mapper.base_mapper.eager_defaults) : 
            statement = statement.return_defaults () 
else : 
            if (mapper.version_id_col is not None) : 
                statement = statement.return_defaults (mapper.version_id_col) 
if hasvalue : 
            for (state, state_dict, params, mapper, connection, value_params, has_all_defaults) in records : 
                c = connection.execute (statement.values (value_params), params) 
                if bookkeeping : 
                    _postfetch (mapper, uowtransaction, table, state, state_dict, c, c.context.compiled_parameters [0], value_params) 
rows += c.rowcount 
                check_rowcount = True...

    
    

    Fix the buggy line: check_rowcount = (assert_multirow or (hasvalue and (len (multiparams) == 1)))
assistant
#Here is Python code to fix the buggy line: check_rowcount = (assert_multirow or (hasvalue and (len (multiparams) == 1)))
.

check_rowcount = (assert_multirow or (assert_singlerow and (len (multiparams) == 1)))