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_query_card_stat.rb
    path of file: ./repos/powerstation/powerstation/command_line_tool/controller_model_analysis
    
    the code of the file until where you have to start completion: $query_return_limited_recs=['any?','blank?','maximum','minumum','calculate','average','sum','pluck','lock','none','limit','uniq','readonly','new_record','n
    
def compute_query_card_stat
	$node_list.each do |n|
		if n.isReadQuery?
			#check chained query
			@temp_list = Array.new
			@temp_list.push(n)
			@n1 = n
			while @n1
				@old_n1 = @n1
				@old_n1.getDataflowEdges.each do |e|
					if e.getToNode.isReadQuery? and @old_n1.getInstr.getDefv == e.getToNode.getInstr.getCaller#@old_n1.getDataflowEdges.length == 1
						@temp_list.push(e.getToNode)
						@n1 = e.getToNode
					end
				end
				if @old_n1 == @n1
					@n1 = nil
				end