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: get_patches_filled.m
    path of file: ./repos/mpsim/lib/snr/po
    
    the code of the file until where you have to start completion: function z_list = get_patches_filled (first_arg, id, num_patches, num_cols)
    assert(isvector(id))
    if (nargin < 3) || isempty(num_patc
    
function z_list = get_patches_filled_aux (z_fnc, id, num_patches, num_cols)
    z_list = NaN([numel(id) num_cols]);
    for i=1:num_patches
        idx = (id == i);
        temp = z_fnc(i,idx);
        % accomodate for is_z_uniform:
        if (size(temp,1) == 1),  temp = repmat(temp, [sum(idx) 1]);  end