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: cifti_write_sdseries.m
    path of file: ./repos/brainSurfer/scripts/HCP/cifti
    
    the code of the file until where you have to start completion: function cifti_write_sdseries(data, filename, varargin)
    %function cifti_write_sdseries(data, filename, ...)
    %   Write a new sdseries cifti file from a 2D data matrix.
    %
    %   The cifti extension on the filename should always be '.sdseries.nii'.
    %
    %   To control the contents of the scalar and series diminfo, use 'start',
    %   'step', 'unit', 'namelist', and 'metadatalist' options, like:
    %

    
function cifti_write_sdseries(data, filename, varargin)
    %function cifti_write_sdseries(data, filename, ...)
    %   Write a new sdseries cifti file from a 2D data matrix.
    %
    %   The cifti extension on the filename should always be '.sdseries.nii'.
    %
    %   To control the contents of the scalar and series diminfo, use 'start',
    %   'step', 'unit', 'namelist', and 'metadatalist' options, like:
    %
    %   cifti_write_sdseries(mydata, 'stuff.sdseries.nii', 'step', 0.72);
    %
    %   You can also specify any option pairs that cifti_write accepts.
    [options, template_varargs] = myargparse(varargin, {'stacklevel', 'disableprovenance', 'keepmetadata'}, true); %stacklevel is an implementation detail, don't add to help
    if isempty(options.stacklevel)
        options.stacklevel = 2; %note the '+ 1' in the cifti_write call, so that this function can be switched with cifti_write even in advanced situations
    end