import csv


def load_IDsLabels(path_to_labels, label_filename):
	"""
	Returns the IDs for training examples and labels for the corresponding ID.
	For training dataset, label_file will be 'train.csv'
	For test dataset, label_file will be 'sample_submission.csv'
	These csv files have two columns: First column correspond to image filenames or "ID"s for each example
	Second column corresponds to labels for proteins e.g. 0 5 28 
	"""
	label_file="".join(path_to_labels+label_filename)
	reader=csv.reader(open(label_file,'r'))
	next(reader) # Skip the header row
	ID_label={}
	for row in reader:
		ID, labels=row 
		ID_label[ID]=labels # Dictionary, for each 'ID' (which also gives the corresponding image filename), the labels for that ID
	return ID_label.keys(), ID_label.values()