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: kwargs.rb
    path of file: ./repos/ruby/lib/rubygems/vendor/optparse/lib/optparse
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
require_relative '../optparse'

class Gem::OptionParser
  #
    
  def define_by_keywords(options, meth, **opts)
    meth.parameters.each do |type, name|
      case type
      when :key, :keyreq
        op, cl = *(type == :key ? %w"[ ]" : ["", ""])
        define("--#{name}=#{op}#{name.upcase}#{cl}", *opts[name]) do |o|
          options[name] = o
        end
      end
    end