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: spm_rmpath.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8
    
    the code of the file until where you have to start completion: function varargout = spm_rmpath(d)
% Recursively removes SPM paths from the MATLAB path
%   SPM_RMPATH checks if the file spm.m is found and removes the
%   path to that file and any subdirectories below it from the MATLAB
%   path.
%

    
function varargout = spm_rmpath(d)
% Recursively removes SPM paths from the MATLAB path
%   SPM_RMPATH checks if the file spm.m is found and removes the
%   path to that file and any subdirectories below it from the MATLAB
%   path.
%
%   P = SPM_RMPATH performs the same function as above and returns the
%   cleaned path string in P.
%
%   SPM_RMPATH(D) strips the path string D from the MATLAB path.
%
%   P = SPM_RMPATH(D) strips the path string D from the MATLAB path and
%   returns the cleaned path string in P.
%
%   See also PATH, ADDPATH, RMPATH, GENPATH, PATHTOOL, SAVEPATH.
%__________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Darren Gitelman & Guillaume Flandin
% $Id: spm_rmpath.m 4025 2010-07-29 11:10:15Z guillaume $ 

varargout = {};
if ~nargin
    % Get the actual SPM directory
    try, d = spm('dir');
    catch, return; end