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: dataset2files.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8/external/fieldtrip/utilities/private
    
    the code of the file until where you have to start completion: function [filename, headerfile, datafile] = dataset2files(filename, format)

% DATASET2FILES manages the filenames for the dataset, headerfile, datafile and eventfile
% and tries to maintain a consistent mapping between them for each of the known fileformats
%
% Use as
%   [filename, headerfile, datafile] = dataset2files(filename, format)


    
function [filename, headerfile, datafile] = dataset2files(filename, format)

% DATASET2FILES manages the filenames for the dataset, headerfile, datafile and eventfile
% and tries to maintain a consistent mapping between them for each of the known fileformats
%
% Use as
%   [filename, headerfile, datafile] = dataset2files(filename, format)

% Copyright (C) 2007-2011, Robert Oostenveld
%
% $Id: dataset2files.m 7307 2013-01-14 13:42:16Z roboos $

if isempty(format)
  format = ft_filetype(filename);
end