def pickle(obj, fname, protocol=2):
 with smart_open(fname, 'wb') as fout:
  _pickle.dump(obj, fout, protocol=protocol)

def pickle ( obj , fname , protocol = 2 ) : with smart_open ( fname , 'wb' ) as fout : _pickle . dump ( obj , fout , protocol = protocol )
pickle object obj to file fname .