<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pickle_data(data, picklefile):
 """Helper function to pickle `data` in `picklefile`."""

    with open(picklefile, 'wb') as f:
        pickle.dump(data, f, protocol=2)