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: uri_credentials_filter.rb
    path of file: ./repos/ruby-packer/ruby/lib/bundler
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Bundler
  module URICredentialsFilter
  module_function

    def credential_filtered_uri(uri_to_anon
    
    def credential_filtered_uri(uri_to_anonymize)
      return uri_to_anonymize if uri_to_anonymize.nil?
      uri = uri_to_anonymize.dup
      if uri.is_a?(String)
        require_relative "vendored_uri"
        uri = Bundler::URI(uri)
      end