'Translates automatic scaling settings to yaml.'

def TranslateAutomaticScaling(self):

    if (not self.app_engine_web_xml.automatic_scaling):
        return []
    statements = ['automatic_scaling:']
    for setting in ['min_pending_latency', 'max_pending_latency', 'min_idle_instances', 'max_idle_instances']:
        value = getattr(self.app_engine_web_xml.automatic_scaling, setting)
        if value:
            statements.append(('        %s:    %s' % (setting, value)))
    return statements
