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: resolver.rb
    path of file: ./repos/dd-trace-rb/lib/datadog/tracing/contrib/redis/vendor
    
    the code of the file until where you have to start completion: require 'uri'

# NOTE: This code is copied directly from Redis.
#       Its purpose is to resolve connection information.
#       It exists here only because it doesn't exist in the redis
#       library as a separated module and it allows to avoid
#       instantiating a new Redis::Client for resolving the connection
module Datadog
  module Tracing
    module Contrib
      module Redis
        module Vendor
          class Resolver # :nodoc:
            # Connection DEFAULTS for a Redis::Client are unchanged for
            # the integration supported options.
            # https://github.com/redis/redis-rb/blob/v3.0.0/lib/redis/client.rb#L6-L14
            # https://github.com/redis/redis-rb/blob/v4.1.3/lib/redis/client.rb#L10-L26
            # Since the integration takes in consideration only few attributes, all
            # versions are compatible for :url, :scheme, :host, :port, :db
            DEFAULTS = {
              url: -> { ENV['REDIS_URL'] },
              scheme: 'redis',
              host: '127.0.0.1',
              port: 6379,
              path: nil,
              # :timeout => 5.0,
              p
    
            def _parse_options(options)
              # https://github.com/redis/redis-rb/blob/v4.1.3/lib/redis/client.rb#L404
              # Early return for modern client options
              return options if options[:_parsed]

              defaults = DEFAULTS.dup
              options = options.dup

              defaults.each_key do |key|
                # Fill in defaults if needed
                defaults[key] = defaults[key].call if defaults[key].respond_to?(:call)

                # Symbolize only keys that are needed
                options[key] = options[key.to_s] if options.key?(key.to_s)
              end

              url = options[:url]
              url = defaults[:url] if url.nil?

              # Override defaults from URL if given
              if url
                uri = URI(url)

                case uri.scheme
                when 'unix'
                  defaults[:path] = uri.path
                when 'redis', 'rediss'
                  defaults[:scheme]   = uri.scheme
                  defaults[:host]     = uri.host if uri.host
                  defaults[:port]     = uri.port if uri.port
                  defaults[:password] = CGI.unescape(uri.password) if uri.password
                  defaults[:db]       = uri.path[1..-1].to_i if uri.path
                  defaults[:role] = :master
                else
                  raise ArgumentError, "invalid uri scheme '#{uri.scheme}'"
                end