'Sets the runtime while respecting vm runtimes rules for runtime settings.
Args:
runtime: The runtime to use.'

def SetEffectiveRuntime(self, runtime):

    if self.IsVm():
        if (not self.vm_settings):
            self.vm_settings = VmSettings()
        self.vm_settings['vm_runtime'] = runtime
        self.runtime = 'vm'
    else:
        self.runtime = runtime
