def get_validation_set_from_train(train, train_cv):
 for (new_train, new_valid) in train_cv:
  return (train[new_train], train[new_valid])

def get_validation_set_from_train ( train , train_cv ) : for ( new_train , new_valid ) in train_cv : return ( train [ new_train ] , train [ new_valid ] )
repartition training set into training and validation sets using the given subset iterator .