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

 """
 Searches through the parent tree to see if it is possible to emit the
 redirect_stdio signal.
 This logic allows to test the SearchInComboBox select_directory method
 outside of the FindInFiles plugin.
 """

        parent = self.parent()
        while parent is not None:
            try:
                parent.redirect_stdio.emit(value)
            except AttributeError:
                parent = parent.parent()
            else:
                break