def pickle_data ( data , picklefile ) : with open ( picklefile , 'wb' ) as f : pickle . dump ( data , f , protocol = 2 )
write python data into pickles
Helper function to pickle data in picklefile .
def pickle_data(data, picklefile):
    """Helper function to pickle `data` in `picklefile`."""
    with open(picklefile, 'wb') as f:
        pickle.dump(data, f, protocol=2)