code: def save(self, filename):
          
  
          with open(filename, 'wb') as savefile:
              pickle.dump(self.__dict__,
                          savefile,
                          protocol=pickle.HIGHEST_PROTOCOL)
docs: Serialize model to filename.