code: def _validate(self, sam_template):
          
  
          if "Resources" not in sam_template or not isinstance(sam_template["Resources"], dict) \
                  or not sam_template["Resources"]:
              raise InvalidDocumentException(
                  [InvalidTemplateException("'Resources' section is required")])
  
          SamTemplateValidator.validate(sam_template)
docs: Validates the template and parameter values and raises exceptions if there's an issue
  
          :param dict sam_template: SAM template