def unpickle_cifar_dic(file):
 fo = open(file, 'rb')
 dict = cPickle.load(fo)
 fo.close()
 return (dict['data'], dict['labels'])

def unpickle_cifar_dic ( file ) : fo = open ( file , 'rb' ) dict = cPickle . load ( fo ) fo . close ( ) return ( dict [ 'data' ] , dict [ 'labels' ] )
helper function: unpickles a dictionary .