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: xASL_bids_MergeNifti.m
    path of file: ./repos/ExploreASL/Functions/BIDS
    
    the code of the file until where you have to start completion: function [NiftiPaths, ASLContext] = xASL_bids_MergeNifti(NiftiPaths, seqType, niiTable)
%xASL_bids_MergeNifti Take a list of NIfTI files and concatenates 3D/4D files into a 4D sequence if possible
%
% FORMAT: NiftiPaths = xASL_bids_MergeNifti(NiftiPaths, seqType[, niiTable])
% 
% INPUT:
%   NiftiPaths - cell containing list of strings with full paths of the files (REQUIRED)
%   seqType    - Type of the file - can be 'M0' or 'ASL' (REQUIRED)
%   niiTable   - cell containing a table Filename, InstanceNumber, SeriesNumber, FileType, FilePath (OPTIONAL, DEFAULT = EMPTY)
%
% OUTPUT:
% NiftiPaths   - return either the same list of files if nothing was done or the path to the
    
function [pathOut,ASLContext] = xASL_bids_MergeNifti_GEASLFiles(NiftiPaths)
% 2. xASL_bids_MergeNifti_GEASLFiles merge any ASL files in alphabetical order, but also load and use the GE ASL 
% tags and save them to a correct ASL context
%
% Description: Uses the GE ImageType tag to sort out the files correctly and saves this order

% By default, the conversion did not work
pathOut = ''; 

% And ASLContext is empty
ASLContext = '';

% We prepare priority scores for merging JSONs
priorityList = zeros(1,length(NiftiPaths));

% Goes through all files
for iFile=1:length(NiftiPaths)
	% For each file, finds the JSONs
	[jsonPath,jsonName,~] = xASL_fileparts(NiftiPaths{iFile});
	jsonPath = fullfile(jsonPath, [jsonName, '.json']);
		
	% Loads the JSON file
	if exist(jsonPath,'file')
		jsonPar = xASL_io_ReadJson(jsonPath);
	else
		fprintf('Warning: Non-existent JSON sidecar: %s\n', jsonPath) ;
		jsonPar = [];
	end