def __init__(self, cf_template):
        super(TemplateGenerator, self).__init__()
        self._reference_map = {}
        if 'AWSTemplateFormatVersion' in cf_template:
            self.add_version(cf_template['AWSTemplateFormatVersion'])
        if 'Description' in cf_template:
            self.add_description(cf_template['Description'])
        if 'Metadata' in cf_template:
            self.add_metadata(cf_template['Metadata'])
        for k, v in cf_template.get('Parameters', {}).iteritems():
            self.add_parameter(self._create_instance(Parameter, v, k))
        for k, v in cf_template.get('Mappings', {}).iteritems():
            self.add_mapping(k, self._convert_definition(v))
        for k, v in cf_template.get('Conditions', {}).iteritems():
            self.add_condition(k, self._convert_definition(v, k))
        for k, v in cf_template.get('Resources', {}).iteritems():
            self.add_resource(self._convert_definition(v, k))
        for k, v in cf_template.get('Outputs', {}).iteritems():
            self.add_output(self._create_instance(Output, v, k))
Instantiates a new Troposphere Template based on an existing
dataset/ETHPy150Open cloudtools/troposphere/troposphere/template_generator.py/TemplateGenerator.__init__