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: msi.rb
    path of file: ./repos/chef/lib/chef/provider/package/windows
    
    the code of the file until where you have to start completion: #
# Author:: Bryan McLellan <btm@loftninjas.org>
# Copyright:: Copyright (c) Chef Software Inc.
    
          def package_version
            return new_resource.version if new_resource.version

            if !new_resource.source.nil? && ::File.exist?(new_resource.source)
              logger.trace("#{new_resource} getting product version for package at #{new_resource.source}")
              get_product_property(new_resource.source, "ProductVersion")
            end