Clears all the data in a given stream and the calculated intervals
        
        :param stream_id: The stream id
        :param remove_definition: Whether to remove the stream definition as well
        :param sandbox: The sandbox id
        :return: None

def purge_stream(self, stream_id, remove_definition=False, sandbox=None):
        """
        Clears all the data in a given stream and the calculated intervals
        
        :param stream_id: The stream id
        :param remove_definition: Whether to remove the stream definition as well
        :param sandbox: The sandbox id
        :return: None
        """

        if sandbox is not None:
            raise NotImplementedError

        if stream_id not in self.streams:
            raise StreamNotFoundError(stream_id)

        self.data[stream_id] = StreamInstanceCollection()
        self.streams[stream_id].calculated_intervals = TimeIntervals()

        if remove_definition:
            del self.data[stream_id]
            del self.streams[stream_id]