<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def text_assert(self, anchor, byte=False):
 """ If `anchor` is not found then raise `DataNotFound` exception. """


        if not self.text_search(anchor, byte=byte):
            raise DataNotFound(u'Substring not found: %s' % anchor)