code: def save(self):
          
          try:
              with open(self._filename, 'wb') as session_file:
                  session_file.write(self.dumps())
          except IOError as error:
              LOGGER.error('Session file error: %s', error)
              raise error
docs: Save the session for later retrieval
  
          :raises: IOError