code: def get_domain_events(self, originator_id, gt=None, gte=None, lt=None, lte=None, limit=None, is_ascending=True,
                            page_size=None):
          
          if page_size:
              sequenced_items = self.iterator_class(
                  record_manager=self.record_manager,
                  sequence_id=originator_id,
                  page_size=page_size,
                  gt=gt,
                  gte=gte,
                  lt=lt,
                  lte=lte,
                  limit=limit,
                  is_ascending=is_ascending,
              )
          else:
              sequenced_items = self.record_manager.get_items(
                  sequence_id=originator_id,
                  gt=gt,
                  gte=gte,
                  lt=lt,
                  lte=lte,
                  limit=limit,
                  query_ascending=is_ascending,
                  results_ascending=is_ascending,
              )
  
          # Deserialize to domain events.
          domain_events = map(self.mapper.event_from_item, sequenced_items)
          return list(domain_events)
docs: Gets domain events from the sequence identified by `originator_id`.
  
          :param originator_id: ID of a sequence of events
          :param gt: get items after this position
          :param gte: get items at or after this position
          :param lt: get items before this position
          :param lte: get items before or at this position
          :param limit: get limited number of items
          :param is_ascending: get items from lowest position
          :param page_size: restrict and repeat database query
          :return: list of domain events