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: pip_package.rb
    path of file: ./repos/LicenseFinder/lib/license_finder/packages
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'set
    
    def self.license_names_from_spec(spec)
      license_names = spec['license'].to_s.strip.split(' or ')
      has_unrecognized_license = false

      license_names.each do |license_name|
        license = License.find_by_name(license_name.strip)

        has_unrecognized_license ||= license.unrecognized_matcher?
      end

      return license_names if !license_names.empty? && !has_unrecognized_license

      spec
        .fetch('classifiers', [])
        .select { |c| c =~ LICENSE_FORMAT }
        .map { |c| c.gsub(LICENSE_FORMAT, '\1') }
    end