code: def GetSortedEvents(self, time_range=None):
      
      if not self._storage_file:
        raise IOError('Unable to read from closed storage writer.')
  
      return self._storage_file.GetSortedEvents(time_range=time_range)
docs: Retrieves the events in increasing chronological order.
  
      This includes all events written to the storage including those pending
      being flushed (written) to the storage.
  
      Args:
        time_range (Optional[TimeRange]): time range used to filter events
            that fall in a specific period.
  
      Returns:
        generator(EventObject): event generator.
  
      Raises:
        IOError: when the storage writer is closed.
        OSError: when the storage writer is closed.