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: conjunction.m
    path of file: ./repos/CanlabCore/CanlabCore/@statistic_image
    
    the code of the file until where you have to start completion: function conj = conjunction(si1, si2, direction, type)
% Returns the conjunction of two statistic_images.  considers positive and
% negative activations separately.
%
% :Inputs:
%
%   Two thresholded statistic images.  Optional 3rd argument:  -1 to
% get only negative conjunction, or 1 to get only positive conjunction
%
% :Output:
%
%   A statistic_image with all voxels suprathreshold (in the same direction) in both input
% images.  Voxel values are set to 1 and -1, to indicate direction.
%
% ..
%    Yoni Ashar, Sept. 2015
% ..
% 
% ..
%    Zizhuang Miao, Oct. 2023
% .. 
% 
% :Inputs:
%
%   Changed the name of the previous optional 3rd argument to "direction"
%
%   Added another optional argument "type", allowed values are "indicator" 
% or "values". "indicator" will return an output with voxel values set to 1 
% and -1 (as previously designed); "values" will return the average voxel
% values of the two input maps. Default to "values" to prevent crashing
% previous scripts using this function.
% 


    
function conj = conjunction(si1, si2, direction, type)
% Returns the conjunction of two statistic_images.  considers positive and
% negative activations separately.
%
% :Inputs:
%
%   Two thresholded statistic images.  Optional 3rd argument:  -1 to
% get only negative conjunction, or 1 to get only positive conjunction
%
% :Output:
%
%   A statistic_image with all voxels suprathreshold (in the same direction) in both input
% images.  Voxel values are set to 1 and -1, to indicate direction.
%
% ..
%    Yoni Ashar, Sept. 2015
% ..
% 
% ..
%    Zizhuang Miao, Oct. 2023
% .. 
% 
% :Inputs:
%
%   Changed the name of the previous optional 3rd argument to "direction"
%
%   Added another optional argument "type", allowed values are "indicator" 
% or "values". "indicator" will return an output with voxel values set to 1 
% and -1 (as previously designed); "values" will return the average voxel
% values of the two input maps. Default to "values" to prevent crashing
% previous scripts using this function.
% 

if nargin == 2
    type = "values"; % default: average of two maps
    direction = 0; % default: both pos and neg
end