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: filloutliers.m
    path of file: ./repos/CanlabCore/CanlabCore/@fmri_timeseries
    
    the code of the file until where you have to start completion: function data_obj = filloutliers(data_obj)
% Find and replace outliers in each voxel of a timeseries object using a

    
function data_obj = filloutliers(data_obj)
% Find and replace outliers in each voxel of a timeseries object using a
% 60-sec moving median outlier detection with spline interpolation.

if isnan(data_obj.TR) || isempty(data_obj.TR) || data_obj.TR == 0
    error('Enter a TR in data_obj.TR')
end