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_mkdir.m
    path of file: ./repos/spm
    
    the code of the file until where you have to start completion: function sts = spm_mkdir(varargin)
% Make new directory trees
% FORMAT sts = spm_mkdir(dir,...)
% dir    - character array, or cell array of strings
%
% sts    - true if all directories were successfully created or already
%          existing, false otherwise.

    
function sts = spm_mkdir(varargin)
% Make new directory trees
% FORMAT sts = spm_mkdir(dir,...)
% dir    - character array, or cell array of strings
%
% sts    - true if all directories were successfully created or already
%          existing, false otherwise.
%__________________________________________________________________________

% Guillaume Flandin
% Copyright (C) 2017-2022 Wellcome Centre for Human Neuroimaging


sts = true;
if nargin > 0
    d1 = cellstr(varargin{1});
    for i=1:numel(d1)
        if ~exist(spm_select('cpath',d1{i}),'dir')
            status = mkdir(d1{i});
            sts = sts & status;
        end