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: generate_cell_metrics_table.m
    path of file: ./repos/CellExplorer/calc_CellMetrics
    
    the code of the file until where you have to start completion: function generate_cell_metrics_table(cell_metrics,UIDs)
    % Generates a table with the full list of metrics (rows=cells, columns=metrics). Function is part of CellExplorer (https://cellexplorer.org/)
    
    UI.lists.metrics = fieldnames(cell_metrics);
    
    [indx,tf] = listdlg('ListString',UI.lists.metrics,'Name','Metrics table','PromptString','Select metrics to show in table','ListSize',[300,400]);
    UI.lists.metrics = UI.lists.metrics(indx);
    
    UI.labels = metrics_labels(UI.lists.metrics);
    
    columnname = {};

    
function generate_cell_metrics_table(cell_metrics,UIDs)
    % Generates a table with the full list of metrics (rows=cells, columns=metrics). Function is part of CellExplorer (https://cellexplorer.org/)
    
    UI.lists.metrics = fieldnames(cell_metrics);
    
    [indx,tf] = listdlg('ListString',UI.lists.metrics,'Name','Metrics table','PromptString','Select metrics to show in table','ListSize',[300,400]);
    UI.lists.metrics = UI.lists.metrics(indx);
    
    UI.labels = metrics_labels(UI.lists.metrics);
    
    columnname = {};
    tableData = {};
    if ~exist('UIDs','var')
        UIDs = 1:cell_metrics.general.cellCount;
    end