code: def Open(self):
      
      if self._storage_file:
        raise IOError('Storage writer already opened.')
  
      self._storage_file = self._CreateStorageFile()
  
      if self._serializers_profiler:
        self._storage_file.SetSerializersProfiler(self._serializers_profiler)
  
      if self._storage_profiler:
        self._storage_file.SetStorageProfiler(self._storage_profiler)
  
      self._storage_file.Open(path=self._output_file, read_only=False)
  
      self._first_written_event_source_index = (
          self._storage_file.GetNumberOfEventSources())
      self._written_event_source_index = self._first_written_event_source_index
docs: Opens the storage writer.
  
      Raises:
        IOError: if the storage writer is already opened.
        OSError: if the storage writer is already opened.