<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sequence_set(self) -> SequenceSet: """The sequence set to use when finding the messages to match against. This will default to all messages unless the search criteria set contains a sequence set. """

        try:
            seqset_crit = next(crit for crit in self.all_criteria
                               if isinstance(crit, SequenceSetSearchCriteria))
        except StopIteration:
            return SequenceSet.all()
        else:
            return seqset_crit.seq_set