docstr: The function is used to power off vm
docstr_tok: ["The","function","is","used","to","power","off","vm"]
code: def power_off_vm(self, vm_name):
      """
      The function is used to power off vm
      """
      vm_obj = self.get_pyvmomi_obj([vim.VirtualMachine], vm_name)
      logger.debug(f"power_off_vm: {vm_name}...")
      time.sleep(10)
      logger.debug(
          f"power_off_vm: powerState={vm_obj.runtime.powerState}..."
      )
      if (
          vm_obj.runtime.powerState
          == vim.VirtualMachinePowerState.poweredOn
      ):
          logger.debug(f"Power off VM {vm_name}...")
          WaitForTask(vm_obj.PowerOffVM_Task())
          logger.debug(f"VM {vm_name} is power off. Done.")
  
imports: import atexit
  import logging
  import ssl
  import time
  from enum import Enum
  from pyVim.connect import Disconnect, SmartStubAdapter, VimSessionOrientedStub
  from pyVim.task import WaitForTask
  from pyVmomi import vim, vmodl
  from ray.autoscaler._private.vsphere.utils import Constants, is_ipv4, singleton_client
label_desc: Use image node_id 9 for calling the PyvmomiSdkProvider obj's underlying member method code with example usage: obj.power_off_vm(vm_name) without return types