<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def search(self, text):
 """ Find text in log file from current position returns a tuple containing: absolute position, position in result buffer, result buffer (the actual file contents) """

        key = hash(text)
        searcher = self._searchers.get(key)
        if not searcher:
            searcher = ReverseFileSearcher(self.filename, text)
            self._searchers[key] = searcher

        position = searcher.find()
        if position < 0:
            # reset the searcher to start from the tail again.
            searcher.reset()
            return -1, -1, ''

        # try to get some content from before and after the result's position
        read_before = self.buffer_size / 2
        offset = max(position - read_before, 0)
        bufferpos = position if offset == 0 else read_before
        self.fp.seek(offset)
        return position, bufferpos, self.read()