human
Complete this python program:
def _emit_post_update_statements(base_mapper, uowtransaction, cached_connections, mapper, table, update):
assistant
#Here is the Python program you requested.

    """Emit UPDATE statements corresponding to value lists collected
    by _collect_post_update_commands().
    """
    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)))
        return table.update(clause)
    statement = base_mapper._memo(('post_update', table), update_stmt)
    for (key, grouper) in groupby(update, (lambda rec: (rec[4], list(rec[2].keys())))):
        connection = key[0]
        multiparams = [params for (state, state_dict, params, mapper, conn) in grouper]
        cached_connections[connection].execute(statement, multiparams)