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: to_ruby.rb
    path of file: ./repos/ruby/ext/psych/lib/psych/visitors
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
require_relative '../scalar_scanner'
require_relative '../class_loader'
require_relative '../exception'

unless defined?(Regexp::NOENCODING)
  Regexp::NOENCODING = 32

    
        def deduplicate key
          if key.is_a?(String)
            # It is important to untaint the string, otherwise it won't
            # be deduplicated into an fstring, but simply frozen.
            -(key.untaint)
          else
            key
          end