def as_stream(self):
        """Convert this selector to a DataStream.

        This function will only work if this is a singular selector that
        matches exactly one DataStream.
        """

        if not self.singular:
            raise ArgumentError("Attempted to convert a non-singular selector to a data stream, it matches multiple", selector=self)

        return DataStream(self.match_type, self.match_id, self.match_spec == DataStreamSelector.MatchSystemOnly)
Convert this selector to a DataStream.

        This function will only work if this is a singular selector that
        matches exactly one DataStream.