code: def is_terminated(self, retry=False):
          
          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
docs: If this instance has finished or not.
  
          :return: True if finished else False
          :rtype: bool