def pickle(file_name, obj):
    with open(file_name, "wb") as pkl_file:
        pickle.dump(obj, pkl_file)
    return
dump a python object to a file using pickle
dataset/ETHPy150Open CGATOxford/cgat/CGAT/IOTools.py/pickle