code: def get_events(self, from_=None, to=None):
          
          assert from_ is None or isinstance(from_, str)
          assert to is None or isinstance(to, str)
          self._close()
          try:
              return self._unsafe_get_events(from_=from_, to=to)
          finally:
              self._open()
docs: Query a slice of the events.
  
          Events are always returned in the order the were added.
  
          Does never throw EventOrderError because it is hard to detect
          from an append-only file.
  
          Parameters:
          from_   -- if not None, return only events added after the event with
                     id `from_`. If None, return from the start of history.
          to      -- if not None, return only events added before, and
                     including, the event with event id `to`. If None, return up
                     to, and including, the last added event.
  
          returns -- an iterable of (event id, eventdata) tuples.