code: def get_snapshot(self, entity_id, lt=None, lte=None):
          
          snapshots = self.snapshot_store.get_domain_events(entity_id, lt=lt, lte=lte, limit=1, is_ascending=False)
          if len(snapshots) == 1:
              return snapshots[0]
docs: Gets the last snapshot for entity, optionally until a particular version number.
  
          :rtype: Snapshot