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: BusUtils.m
    path of file: ./repos/cocoSim-deprecated/src/utils
    
    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 [list_const list_fields] = list_cst(K, bus)
		if strcmp(class(K), 'struct')
			[list_const list_fields] = BusUtils.list_cst_struct(K, bus);
		else
			list_const = '';
			list_fields = '';
			[dim_r dim_c] = size(K);
			idx_res = 1;
			for idx_elem=1:numel(bus.Elements)
				elem = bus.Elements(idx_elem);
				dt = Utils.get_lustre_dt(elem.DataType);
				if numel(elem.Dimensions) == 1
					maxi = max(dim_r,dim_c);
					% Here, either the constant value is a scalar and thus is
					% expanded to the size of the bus element or it is a one
					% dimentional data structure and then it is of the size of 
					% every bus element
					for idx_dim=1:elem.Dimensions
						if maxi == 1
							value = K;
						else
							value = K(idx_dim);
						end