##### SUMMARY
Move some helper functions from `vmware_host_config_manager` to `PyVmomi`.

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
vmware_host_config_manager
vmware

##### ADDITIONAL INFORMATION
`vmware_host_config_manager` has some helper functions (`is_integer`, `is_boolean` and `is_truthy`) to deal with vSphere Web Services API `OptionValue`s. Today, I started to work on issue #61421 and I think these helper functions could be useful there, too. Actually, there are several Managed Object Types with an `OptionValue[]` parameter. Instead of duplicating the code, I think it would be better to move these helper functions to `PyVmomi` in `module_utils/vmware.py`.
if timeout > 0:
                                result.update(wait_for_poweroff(vm, timeout))
                        else:
                            task = vm.RebootGuest()
                        
                        
                        result['changed'] = True
                    else:
                        result['failed'] = True
                        result['msg'] = "VMware tools should be installed for guest shutdown/reboot"
                else:
                    result['failed'] = True
                    result['msg'] = "Virtual machine %s must be in poweredon state for guest shutdown/reboot" % vm.name
            else:
                result['failed'] = True
                result['msg'] = "Unsupported expected state provided: %s" % expected_state
        except Exception as e:
            result['failed'] = True
            result['msg'] = to_text(e)
        if task:
            wait_for_task(task)
            if task.info.state == 'error':
                result['failed'] = True
                result['msg'] = task.info.error.msg
            else:
                result['changed'] = True
    
    result['instance'] = gather_vm_facts(content, vm)
    return result
def wait_for_poweroff(vm, timeout=300):