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: failed_pull1751.m
    path of file: ./repos/fieldtrip/test/invalid
    
    the code of the file until where you have to start completion: function test_pull1751

% WALLTIME 00:20:00
% MEM 1gb
% DEPENDENCY ft_nirs_signalqualityindex

% load sample set of data

    
function test_pull1751

% WALLTIME 00:20:00
% MEM 1gb
% DEPENDENCY ft_nirs_signalqualityindex

% load sample set of data
fname = dccnpath('/home/common/matlab/fieldtrip/data/test/original/nirs/artinis/Sofia/sample_data.oxy4');

cfg = [];
cfg.dataset = fname; 
cfg.channel = 'nirs';
data_test = ft_preprocessing(cfg);

% load expected data output
load('/home/common/matlab/fieldtrip/data/test/sqi/output_sqi.mat');
 
% compute sqi
cfg = [];
data_out = ft_nirs_signalqualityindex(cfg, data_test);

% check whether it matches the expected output
assert(isequaln(data_out.trial, output_trials))

% check whether the size of the output matrix is consistent with the input one
assert(isequal(size(output_trials{1}),size(data_test.trial{1}))) 

%%%% check whether it raises error when there are problems with the labels
% case 1: channel labels do not match the expected order
data_non_ordered = data_test;
labels = data_non_ordered.label;
idx_rand = randperm(numel(labels));
labels_new = labels(idx_rand);

trials = data_non_ordered.trial;
trials_new{1, 1} = trials{1, 1}(idx_rand,:);

data_non_ordered.trial = trials_new;
data_non_ordered.label = labels_new;

try
    ft_nirs_signalqualityindex(cfg, data_non_ordered);
    raises_error = 0;
catch 
    raises_error = 1;
end