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
If this instance has finished or not.

        :return: True if finished else False
        :rtype: bool