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: mars_rois2img.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8/marsbar-0.44
    
    the code of the file until where you have to start completion: function mars_rois2img(roi_list, img_name, roi_space, flags)
% creates cluster or number labelled ROI image from ROIs

    
function mars_rois2img(roi_list, img_name, roi_space, flags)
% creates cluster or number labelled ROI image from ROIs
% FORMAT mars_rois2img(roi_list, img_name, roi_space, flags)
%
% roi_list  - strings with ROI filenames
% img_name  - name of image to write out
% roi_space - space for image
% flags    - none or more of: [default = 'i']
%             'i' - id image, voxel values identify ROIs
%             'c' - cluster image, clusters identified by location
%
% $Id %
  
if nargin < 1
  roi_list = '';
end
if nargin < 2
  img_name = '';
end
if nargin < 3
  roi_space = [];
end
if nargin < 4
  flags = '';
end

% Process input arguments
if isempty(roi_list)
  roi_list = spm_get([0 Inf], ['*' maroi('classdata', 'fileend')], ...
		     'Select ROIs to write to image');
  if isempty(roi_list), return, end