You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: schema_statements.rb
    path of file: ./repos/online_migrations/lib/online_migrations
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module OnlineMigrations
  module SchemaStatements
    include ChangeColumnTypeHelpers
    include BackgroundMigrations::MigrationHelpers

    # Updates the value 
    
    def update_columns_in_batches(table_name, columns_and_values,
                                  batch_size: 1000, batch_column_name: primary_key(table_name), progress: false, pause_ms: 50)
      __ensure_not_in_transaction!

      if !columns_and_values.is_a?(Array) || !columns_and_values.all?(Array)
        raise ArgumentError, "columns_and_values must be an array of arrays"
      end