code: def dump_to_template_obj(self, stack, t):
          
          if len(self.Parameters) > 0:
              t['Parameters'] = dict([e.contents(stack) for e in self.Parameters])
          if len(self.Mappings) > 0:
              t['Mappings'] = dict([e.contents(stack) for e in self.Mappings])
          if len(self.Resources) > 0:
              t['Resources'] = dict([e.contents(stack) for e in self.Resources])
          if len(self.Outputs) > 0:
              t['Outputs'] = dict([e.contents(stack) for e in self.Outputs])
docs: Add resource definitions to the given template object