<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def shutdown(self):
 """ Shutdown guest fallback to power off if guest tools aren't installed """

        vm = self.get_vm_failfast(self.config['name'])

        if vm.runtime.powerState == vim.VirtualMachinePowerState.poweredOff:
            print("%s already poweredOff" % vm.name)
        else:
            if self.guestToolsRunning(vm):
                timeout_minutes = 10
                print("waiting for %s to shutdown "
                      "(%s minutes before forced powerOff)" % (
                          vm.name,
                          str(timeout_minutes)
                      ))
                vm.ShutdownGuest()
                if self.WaitForVirtualMachineShutdown(vm,
                                                      timeout_minutes * 60):
                    print("shutdown complete")
                    print("%s poweredOff" % vm.name)
                else:
                    print("%s has not shutdown after %s minutes:"
                          "will powerOff" % (vm.name, str(timeout_minutes)))
                    self.powerOff()

            else:
                print("GuestTools not running or not installed: will powerOff")
                self.powerOff()