docstr: The function is used to instant clone vm from frozen-vm
docstr_tok: ["The","function","is","used","to","instant","clone","vm","from","frozen-vm"]
code: def instance_clone_vm(
      self,
      source_vm_name,
      target_vm_name,
      target_resource_pool_name,
      target_datastore_name,
  ):
      """
      The function is used to instant clone vm from frozen-vm
      """
      # If resource pool is not provided, then the resource pool
      # of the source VM will also be the resource pool of the target VM.
      resource_pool = (
          self.get_pyvmomi_obj(
              [vim.ResourcePool], target_resource_pool_name
          )
          if target_resource_pool_name
          else None
      )
      # If datastore is not provided, then the datastore
      # of the source VM will also be the resource pool of the target VM.
      datastore = (
          self.get_pyvmomi_obj([vim.Datastore], target_datastore_name)
          if target_datastore_name
          else None
      )
      vm_relocate_spec = vim.vm.RelocateSpec(
          pool=resource_pool,
          datastore=datastore,
      )
      instant_clone_spec = vim.vm.InstantCloneSpec(
          name=target_vm_name, location=vm_relocate_spec
      )
      source_vm = self.get_pyvmomi_obj(
          [vim.VirtualMachine], source_vm_name
      )
      WaitForTask(source_vm.InstantClone_Task(spec=instant_clone_spec))
      logger.info(
          f"Clone VM {target_vm_name} from Frozen-VM {source_vm_name}"
      )
  
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 17 for calling the PyvmomiSdkProvider obj's underlying member method code with example usage: obj.instance_clone_vm(source_vm_name, target_vm_name, target_resource_pool_name, target_datastore_name) without return types