def on_after_transform_template(self, template):
if self._wait_for_template_active_status and not self._validate_only:<EOL><INDENT>start_time = time()<EOL>while (time() - start_time) < self.TEMPLATE_WAIT_TIMEOUT_SECONDS:<EOL><INDENT>temp = self._in_progress_templates<EOL>self._in_progress_templates = []<EOL>for application_id, template_id in temp:<EOL><INDENT>get_cfn_template = (lambda application_id, template_id:<EOL>self._sar_client.get_cloud_formation_template(<EOL>ApplicationId=self._sanitize_sar_str_param(application_id),<EOL>TemplateId=self._sanitize_sar_str_param(template_id)))<EOL>response = self._sar_service_call(get_cfn_template, application_id, application_id, template_id)<EOL>self._handle_get_cfn_template_response(response, application_id, template_id)<EOL><DEDENT>if len(self._in_progress_templates) == <NUM_LIT:0>:<EOL><INDENT>break<EOL><DEDENT>sleep(self.SLEEP_TIME_SECONDS)<EOL><DEDENT>if len(self._in_progress_templates) != <NUM_LIT:0>:<EOL><INDENT>application_ids = [items[<NUM_LIT:0>] for items in self._in_progress_templates]<EOL>raise InvalidResourceException(application_ids, "<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT><DEDENT>
Hook method that gets called after the template is processed

Go through all the stored applications and make sure they're all ACTIVE.

:param dict template: Dictionary of the SAM template
:return: Nothing