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: pr_fmri_design.m
    path of file: ./repos/bspm/thirdparty/spm12/toolbox/marsbar-0.44/@mardo_5/private
    
    the code of the file until where you have to start completion: function [SPM] = pr_fmri_design(SPM)

    
function [SPM] = pr_fmri_design(SPM)
% MarsBaR version of spm_fMRI design - asssembles a design for fMRI studies
% FORMAT [SPM] = pr_fmri_design(SPM)
%
% This file is a hardly edited version of:
% @(#)spm_fMRI_design.m	2.34 Karl Friston 03/01/30
% See that (SPM2) version for comments etc
%
% $Id: pr_fmri_design.m 607 2006-03-30 20:54:55Z matthewbrett $
  
%-GUI setup
%-----------------------------------------------------------------------
SPMid    = spm('SFnBanner',mfilename,marsbar('ver'));
[Finter,Fgraph,CmdLine] = spm('FnUIsetup','fMRI stats model setup',0);
spm_help('!ContextHelp',mfilename)

% construct Design matrix {X} - cycle over sessions
%=======================================================================

% global parameters
%-----------------------------------------------------------------------
try
	fMRI_T     = SPM.xBF.T;
	fMRI_T0    = SPM.xBF.T0;
catch
	global defaults
	d_fmri = mars_struct('getifthere', defaults, 'stats', 'fmri');
	if mars_struct('isthere', d_fmri, 't')
	  fMRI_T  = d_fmri.t;
	  fMRI_T0 = d_fmri.t0;
	else,
	  fMRI_T  = 16;
	  fMRI_T0 = 1;
	end