def is_valid(self):
managed_policy_map = self.managed_policy_loader.load()<EOL>sam_translator = Translator(managed_policy_map=managed_policy_map,<EOL>sam_parser=self.sam_parser,<EOL>plugins=[])<EOL>self._replace_local_codeuri()<EOL>try:<EOL><INDENT>template = sam_translator.translate(sam_template=self.sam_template,<EOL>parameter_values={})<EOL>LOG.debug("<STR_LIT>", yaml_dump(template))<EOL><DEDENT>except InvalidDocumentException as e:<EOL><INDENT>raise InvalidSamDocumentException(<EOL>functools.reduce(lambda message, error: message + '<STR_LIT:U+0020>' + str(error), e.causes, str(e)))<EOL><DEDENT>
Runs the SAM Translator to determine if the template provided is valid. This is similar to running a
ChangeSet in CloudFormation for a SAM Template

Raises
-------
InvalidSamDocumentException
     If the template is not valid, an InvalidSamDocumentException is raised