code: def pickle(self, path):
          
          with open(os.path.expanduser(path), "wb") as pickle:
              cPickle.Pickler(pickle, cPickle.HIGHEST_PROTOCOL).dump(self)
docs: Write objects to python pickle.
  
          Pickling is Python's method for serializing/deserializing
          Python objects. This allows you to save a fully functional
          JSSObject to disk, and then load it later, without having to
          retrieve it from the JSS.
  
          This method will pickle each item as it's current type; so
          JSSListData objects will be serialized as JSSListData, and
          JSSObjects as JSSObjects. If you want full data, do:
              my_list.retrieve_all().pickle("filename")
  
          Args:
              path: String file path to the file you wish to (over)write.
                  Path will have ~ expanded prior to opening.