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: CBIG_MMP_GenerateAnnotationColortable.m
    path of file: ./repos/CBIG/stable_projects/predict_phenotypes/Ooi2022_MMP/generate_figures/feature_importance_figures
    
    the code of the file until where you have to start completion: function colortable = CBIG_MMP_GenerateAnnotationColortable(discretization_res, colorscale)

% colortable = CBIG_MMP_GenerateAnnotationColortable(discretization_res, colorscale)
% 
% Adapted from CBIG_TRBPC_GenerateAnnotationColortable.
% Generate a colortable for surface annotation based on an input colorscale
%

    
function colortable = CBIG_MMP_GenerateAnnotationColortable(discretization_res, colorscale)

% colortable = CBIG_MMP_GenerateAnnotationColortable(discretization_res, colorscale)
% 
% Adapted from CBIG_TRBPC_GenerateAnnotationColortable.
% Generate a colortable for surface annotation based on an input colorscale
%
% Input:
%   - discretization_res: number of distinct discrete colors in the output colortable
%   - colorscale        : the input color scheme that the output colortable for the annotation is produced
% Output:
%   - colortable        : the output colortable for surface annotation.
%                         The underlying gray color of the brain surface
%                         is saved at the end