docstr: This function will remove all tags of vm.
  Example: If a tag called node-status:initializing is present on the VM.
  If we would like to add a new value called finished with the node-status
  key.We'll need to delete the older tag node-status:initializing first
  before creating
  node-status:finished
docstr_tok: ["This","function","will","remove","all","tags","of","vm",".","Example",":","If","a","tag","called","node-status",":","initializing","is","present","on","the","VM",".","If","we","would","like","to","add","a","new","value","called","finished","with","the","node-status","key.We","'ll","need","to","delete","the","older","tag","node-status",":","initializing","first","before","creating","node-status",":","finished"]
code: def remove_tag_from_vm(self, tag_key_to_remove, vm_id):
      """
      This function will remove all tags of vm.
      Example: If a tag called node-status:initializing is present on the VM.
      If we would like to add a new value called finished with the node-status
      key.We'll need to delete the older tag node-status:initializing first
      before creating
      node-status:finished
      """
      dynamic_id = DynamicID(type=Constants.TYPE_OF_RESOURCE, id=vm_id)
  
      # List all the tags present on the VM.
      for tag_id in self.list_vm_tags(dynamic_id):
          vsphere_vm_tag = self.vsphere_sdk_client.tagging.Tag.get(
              tag_id=tag_id
          ).name
          tag_key_value = vsphere_tag_to_kv_pair(vsphere_vm_tag)
          tag_key = tag_key_value[0] if tag_key_value else None
          if tag_key == tag_key_to_remove:
              # Remove the tag matching the key passed.
              logger.debug(
                  "Removing tag {} from the VM {}".format(
                      tag_key, vm_id
                  )
              )
              self.vsphere_sdk_client.tagging.TagAssociation.detach(
                  tag_id, dynamic_id
              )
              break
  
imports: import logging
  import time
  import uuid
  from threading import RLock
  import com.vmware.vapi.std.errors_client
  import requests
  from com.vmware.cis.tagging_client import CategoryModel
  from com.vmware.content.library_client import Item
  from com.vmware.vapi.std.errors_client import Unauthenticated
  from com.vmware.vapi.std_client import DynamicID
  from com.vmware.vcenter.ovf_client import DiskProvisioningType, LibraryItem
  from com.vmware.vcenter.vm.hardware_client import Cpu, Memory
  from com.vmware.vcenter.vm_client import Power
  from com.vmware.vcenter_client import VM, Host, ResourcePool
  from vmware.vapi.vsphere.client import create_vsphere_client
  from ray.autoscaler._private.vsphere.utils import Constants, singleton_client
  from ray.autoscaler.tags import TAG_RAY_CLUSTER_NAME
label_desc: Use image node_id 13 for calling the VsphereSdkProvider obj's underlying member method code with example usage: obj.remove_tag_from_vm(tag_key_to_remove, vm_id) without return types