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: repositories_finder.rb
    path of file: ./repos/dependabot-core/maven/lib/dependabot/maven/file_parser
    
    the code of the file until where you have to start completion: # typed: false
# frozen_string_literal: true

require "nokogiri"

require "dependabot/dependency_file"
require "dependabot/maven/file_parser"
require "dependabot/registry_client"
require "dependabot/errors"

# For documentation, see:
# - http://maven.apache.org/pom.html#Repositories
# - http://maven.apache
    
        def repository_urls(pom:, exclude_inherited: false, exclude_snapshots: true)
          entries = gather_repository_urls(pom: pom, exclude_inherited: exclude_inherited)
          ids = Set.new
          @known_urls += entries.map do |entry|
            next if entry[:id] && ids.include?(entry[:id])

            ids.add(entry[:id]) unless entry[:id].nil?
            entry
          end
          @known_urls = @known_urls.uniq.compact

          urls = urls_from_credentials + @known_urls.reject { |entry| exclude_snapshots && entry[:snapshots] }
                                                    .map { |entry| entry[:url] }
          urls += [central_repo_url] unless @known_urls.any? { |entry| entry[:id] == super_pom[:id] }
          urls.uniq
        end