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: getTrainList.m
    path of file: ./repos/FaceVerification/dataset
    
    the code of the file until where you have to start completion: function [pair1,pair2] = getTrainList(C,image_in_class,image_num_in_class)
% A quite dirty implementation of generating same face pair and different
% face pair. The ratio of same/diff can be controlled by same_r. If this
% code do wrong, just re-run it. Please refer to get10TrainList.m for
% usage.
all_class = 10575;
% clear all;

    
function [pair1,pair2] = getTrainList(C,image_in_class,image_num_in_class)
% A quite dirty implementation of generating same face pair and different
% face pair. The ratio of same/diff can be controlled by same_r. If this
% code do wrong, just re-run it. Please refer to get10TrainList.m for
% usage.
all_class = 10575;
% clear all;
% load('temp1.mat');

test_class = 0;
test_num = sum(C{2}>all_class-test_class);
total = length(C{2});
train_num = total - test_num;
same_r = 0.5;
% idx = randperm(train_num);
% pair1 = idx(1:train_num/2);
% pair2 = idx(train_num/2+1:end