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: trace_flow.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: $QUERY_COLOR = "orange"
$FLOWEDGE_COLOR = "blue"

def get_closure_tag
	r = ""
	i = 0
	if $closure_stack.length > 0
		r += "#{$closure_stack[-1].getRand}"
	end
	r += "_"
	$closure_stack.each do |c|
		r += "closure#{i}_"
		i += 1
	end
	return r
end
#TODO: a lot of duplicated code

def handle_single_call_node(start_class, start_function, class_handler, call, level, bb_index, simplified_caller=nil)
		#callerv_name = call.findCaller(start_class, start_function)
		#callerv = $class_map[callerv_name]
		#pre-computed after reading all files, in #re
    
def handle_single_instr(start_class, start_function, class_handler, bb, instr, label_list, function_handler, level)

	instr.setFTag($l_index)
	if instr.is_a?Call_instr
		#match instr's call to funccall in Method_class
		call = call_match_name(instr.getResolvedCaller, instr.getFuncname, function_handler)
		#if call == nil
		#	OUTPUT_Direct "Name doesn't match: #{instr.toString} [#{instr.getResolvedCaller}]" 
		#else
		#	OUTPUT_Direct "match call: #{instr.toString} [#{instr.getResolvedCaller}]-> #{call.getObjName}.#{call.getFuncName}"
		#end
		if call != nil

			#OUTPUT_Direct "Map to #{call.getObjName}.#{call.getFuncName}"
			#print "\t -- "
			#call.print
		
			if instr.getResolvedCaller.length > 0
				handle_single_call_node(start_class, start_function, class_handler, call, level, bb.getIndex, instr.getResolvedCaller)
			else
				handle_single_call_node(start_class, start_function, class_handler, call, level, bb.getIndex)				
			end
	
		end