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: textcolorbar.m
    path of file: ./repos/CDT/cdt
    
    the code of the file until where you have to start completion: function h = textcolorbar(labels,varargin) 
% textcolorbar creates a color-scaled text that is something between
% a colorbar and a text legend. It does *not* hijack the curre
    
function was written by Chad A. Greene of NASA's Jet Propulsion 
% Laboratory, October 2021. 
% 
% See also: text, legend, and colorbar. 

%% Parse inputs: 

% Set defaults: 
loc = 'nw'; 
if isnumeric(labels)
   col = parula; % might be interpolated later based on input values
else
   col = parula(length(labels)); 
end