<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wait_for_lime(self, listen_port, listen_address="0.0.0.0", max_tries=20, wait=1):
 """ Wait for lime to load unless max_retries is exceeded :type listen_port: int :param listen_port: port LiME is listening for connections on :type listen_address: str :param listen_address: address LiME is listening for connections on :type max_tries: int :param max_tries: maximum number of checks that LiME has loaded :type wait: int :param wait: time to wait between checks """

        tries = 0
        pattern = self.commands.lime_pattern.value.format(listen_address,
                                                          listen_port)
        lime_loaded = False
        while tries < max_tries and lime_loaded is False:
            lime_loaded = self.check_for_lime(pattern)
            tries = tries + 1
            time.sleep(wait)
        return lime_loaded