code: def WriteSessionCompletion(self, aborted=False):
      
      self._RaiseIfNotWritable()
  
      if self._storage_type != definitions.STORAGE_TYPE_SESSION:
        raise IOError('Unsupported storage type.')
  
      self._session.aborted = aborted
      session_completion = self._session.CreateSessionCompletion()
      self._storage_file.WriteSessionCompletion(session_completion)
docs: Writes session completion information.
  
      Args:
        aborted (Optional[bool]): True if the session was aborted.
  
      Raises:
        IOError: if the storage type is not supported or
            when the storage writer is closed.
        OSError: if the storage type is not supported or
            when the storage writer is closed.