'Returns the app\'s runtime, resolving VMs to the underlying vm_runtime.
Returns:
The effective runtime: the value of beta/vm_settings.vm_runtime if
runtime is "vm", or runtime otherwise.'

def GetEffectiveRuntime(self):

    if ((self.runtime == 'vm') and hasattr(self, 'vm_settings') and (self.vm_settings is not None)):
        return self.vm_settings.get('vm_runtime')
    if ((self.runtime == 'vm') and hasattr(self, 'beta_settings') and (self.beta_settings is not None)):
        return self.beta_settings.get('vm_runtime')
    return self.runtime
