<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_terminated(self, retry=False):
 """ If this instance has finished or not. :return: True if finished else False :rtype: bool """

        retry_num = options.retry_times
        while retry_num > 0:
            try:
                return self.status == Instance.Status.TERMINATED
            except (errors.InternalServerError, errors.RequestTimeTooSkewed):
                retry_num -= 1
                if not retry or retry_num <= 0:
                    raise