<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def join(self, timeout=None):
 """Blocking wait for the execution to finish :param float timeout: Maximum time to wait or None for infinitely :return: True if the execution finished, False if no state machine was started or a timeout occurred :rtype: bool """

        if self.__wait_for_finishing_thread:
            if not timeout:
                # signal handlers won't work if timeout is None and the thread is joined
                while True:
                    self.__wait_for_finishing_thread.join(0.5)
                    if not self.__wait_for_finishing_thread.isAlive():
                        break
            else:
                self.__wait_for_finishing_thread.join(timeout)
            return not self.__wait_for_finishing_thread.is_alive()
        else:
            logger.warning("Cannot join as state machine was not started yet.")
            return False