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: keyword_parameters_order.rb
    path of file: ./repos/rubocop/lib/rubocop/cop/style
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module RuboCop
  module Cop
    module Style
      # Enforces that optional keyword parameters are placed at the
      # end of the parameters list.
      #
      # This improves readability, because when l
    
        def on_kwoptarg(node)
          kwarg_nodes = node.right_siblings.select(&:kwarg_type?)
          return if kwarg_nodes.empty?

          add_offense(node) do |corrector|
            if node.parent.find(&:kwoptarg_type?) == node
              corrector.insert_before(node, "#{kwarg_nodes.map(&:source).join(', ')}, ")

              arguments = node.each_ancestor(:def, :defs, :block).first.arguments
              append_newline_to_last_kwoptarg(arguments, corrector) unless parentheses?(arguments)

              remove_kwargs(kwarg_nodes, corrector)
            end
          end