<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _init_incremental_search(self, searchfun, init_event):

 u"""Initialize search prompt
 """

        log("init_incremental_search")
        self.subsearch_query = u''
        self.subsearch_fun = searchfun
        self.subsearch_old_line = self.l_buffer.get_line_text()

        queue = self.process_keyevent_queue
        queue.append(self._process_incremental_search_keyevent)

        self.subsearch_oldprompt = self.prompt

        if (self.previous_func != self.reverse_search_history and
            self.previous_func != self.forward_search_history):
            self.subsearch_query = self.l_buffer[0:Point].get_line_text()

        if self.subsearch_fun == self.reverse_search_history:
            self.subsearch_prompt = u"reverse-i-search%d`%s': "
        else:
            self.subsearch_prompt = u"forward-i-search%d`%s': "

        self.prompt = self.subsearch_prompt%(self._history.history_cursor, "")

        if self.subsearch_query:
            self.line = self._process_incremental_search_keyevent(init_event)
        else:
            self.line = u""