'Translates <resources> in appengine-web.xml to yaml.'

def TranslateResources(self):

    resources = self.app_engine_web_xml.resources
    if (not resources):
        return []
    statements = ['resources:']
    for attr in ('cpu', 'memory_gb', 'disk_size_gb'):
        value = getattr(resources, attr, None)
        if (value is not None):
            statements.append(('        %s:    %s' % (attr, value)))
    return statements
