<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_snapshot(self, entity_id, lt=None, lte=None):
 """ Gets the last snapshot for entity, optionally until a particular version number. :rtype: Snapshot """

        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]