code: def CheckForQuestionPending(task):
      
  
      vm = task.info.entity
      if vm is not None and isinstance(vm, vim.VirtualMachine):
          qst = vm.runtime.question
          if qst is not None:
              raise TaskBlocked("Task blocked, User Intervention required")
docs: Check to see if VM needs to ask a question, throw exception