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: security_option.rb
    path of file: ./repos/artichoke/artichoke-backend/vendor/ruby/lib/rubygems
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative '../rubygems'

# forward-declare

module Gem::Security # :nodoc:
  class Policy # :nodoc:
  end
end

##
# Mixin methods for securit
    
  def add_security_option
    Gem::OptionParser.accept Gem::Security::Policy do |value|
      require_relative 'security'

      raise Gem::OptionParser::InvalidArgument, 'OpenSSL not installed' unless
        defined?(Gem::Security::HighSecurity)

      policy = Gem::Security::Policies[value]
      unless policy
        valid = Gem::Security::Policies.keys.sort
        raise Gem::OptionParser::InvalidArgument, "#{value} (#{valid.join ', '} are valid)"
      end
      policy
    end