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: formatting.rb
    path of file: ./repos/solargraph/lib/solargraph/language_server/message/text_document
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'securerandom'
require 'tmpdir'

module Solargraph
  module LanguageServer
    module Message
      module TextDocumen
    
          def formatter_class(config)
            if self.class.const_defined?('BlankRubocopFormatter')
              BlankRubocopFormatter
            else
              require_rubocop(config['version'])
              klass = Class.new(::RuboCop::Formatter::BaseFormatter)
              self.class.const_set 'BlankRubocopFormatter', klass
            end