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: write_goto_from.m
    path of file: ./repos/cocoSim-deprecated/src/middleEnd
    
    the code of the file until where you have to start completion: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This file is part of CoCoSim.
% Copyright (C) 2014-2016  Carnegie Mellon University
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
    
function [output_string add_vars] = write_goto_from(unbloc, inter_blk, goto_tag, xml_trace)

output_string = '';
add_vars = '';

if strcmp(unbloc.type, 'Goto')
	[list_in] = list_var_entree(unbloc, inter_blk);
	add_vars = '\t';
	in_dt = Utils.get_lustre_dt(unbloc.inports_dt{1});
	for idx_dim=1:unbloc.srcport_size
		var_name = sprintf('Goto_%s_%s',  goto_tag, num2str(idx_dim));
		output_string = app_sprintf(output_string, '\t%s = %s;\n', var_name, list_in{idx_dim});
		add_vars = [add_vars var_name];
		if idx_dim == unbloc.srcport_size
			add_vars = [add_vars ': ' in_dt ';\n'];
		else
			add_vars = [add_vars ', '];
		end