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: base.rb
    path of file: ./repos/mongo-ruby-driver/lib/mongo/write_concern
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# rubocop:todo all

# Copyright (C) 2014-2020 MongoDB Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use thi
    
      def initialize(options)
        options = Options::Mapper.transform_keys_to_symbols(options)
        options = Options::Mapper.transform_values_to_strings(options).freeze

        if options[:w]
          if options[:w] == 0 && options[:j]
            raise Error::InvalidWriteConcern, "Invalid write concern options: :j cannot be true when :w is 0: #{options.inspect}"
          elsif options[:w] == 0 && options[:fsync]
            raise Error::InvalidWriteConcern, "Invalid write concern options: :fsync cannot be true when :w is 0: #{options.inspect}"
          elsif options[:w].is_a?(Integer) && options[:w] < 0
            raise Error::InvalidWriteConcern, "Invalid write concern options: :w cannot be negative (#{options[:w]}): #{options.inspect}"
          end