def generate_labels_frii(train_i, test_i, labels):
   """Gets train and test labels for FRII vs Random classification.
   
   # Arguments
      train_i: Training indices. Output of get_random_data function.
         Shape of [samples,].
      test_i: Testing indices. Output of get_random_data function.
         Shape of [samples,].
      labels: label array. 'labels' dataset in data h5py file as
         numpy array with shape [samples,]
      
   # Returns
      Training and testing labels, with FRII sources as True
      and FRI and Random sources as False.
   """
   train = labels[train_i]
   test = labels[test_i]

   train_y = train == 2
   test_y = test == 2

   return train_y, test_y