code: def _handle_get_cfn_template_response(self, response, application_id, template_id):
          
          status = response['Status']
          if status != "ACTIVE":
              # Other options are PREPARING and EXPIRED.
              if status == 'EXPIRED':
                  message = ("Template for {} with id {} returned status: {}. Cannot access an expired "
                             "template.".format(application_id, template_id, status))
                  raise InvalidResourceException(application_id, message)
              self._in_progress_templates.append((application_id, template_id))
docs: Handles the response from the SAR service call
  
          :param dict response: the response dictionary from the app repo
          :param string application_id: the ApplicationId
          :param string template_id: the unique TemplateId for this application