

def get_backfill_events(self, room_id, event_list, limit):
    'Get a list of Events for a given topic that occurred before (and\n        including) the events in event_list. Return a list of max size `limit`\n\n        Args:\n            txn\n            room_id (str)\n            event_list (list)\n            limit (int)\n        '
    return self.runInteraction('get_backfill_events', self._get_backfill_events, room_id, event_list, limit).addCallback(self._get_events).addCallback((lambda l: sorted(l, key=(lambda e: (- e.depth)))))

dataset/ETHPy150Open matrix-org/synapse/synapse/storage/event_federation.py EventFederationStore.get_backfill_events/original