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: compute_input_stat.rb
    path of file: ./repos/powerstation/powerstation/IDE_plugin/out/production/resources/static-analyzer/controller_model_analysis
    
    the code of the file until where you have to start completion: def compute_query_on_longest_path(startn)
	@cur_node = startn
	@q_list = Array.new
	while @cur_node
		if @cur_node.isQuery?
			@q_list.push(@cur_node)
    
def compute_input_stat
	$graph_file.puts("<inputSensitivityStats>")
	$node_list.each do |n|
		if n.getInstr.getFromUserInput
			@reach_branch = false
			@shortest = 0
			@longest = 0
			traceforward_data_dep(n).each do |n1|
				if @reach_branch == false
					if n1.isBranch?
						@reach_branch = true
						@shortest = n1.shortest_path_length
						@longest = n1.path_length
						break
					end	
				end
			end