code: def test_update_vsphere_configs():
      input_config = {
          "available_node_types": {
              "ray.head.default": {
                  "resources": {},
                  "node_config": {
                      "resource_pool": "ray",
                      "datastore": "vsan",
                  },
              },
              "worker": {"resources": {}, "node_config": {}},
          },
          "provider": {"vsphere_config": {}},
          "head_node_type": "ray.head.default",
      }
  
      with pytest.raises(KeyError):
          update_vsphere_configs(input_config)
  
      input_config = {
          "provider": {
              "vsphere_config": {
                  "frozen_vm": {
                      "name": "frozen",
                      "resource_pool": "frozen-rp",
                      "library_item": "frozen",
                      "cluster": "cluster",
                      "datastore": "vsanDatastore",
                  },
                  "gpu_config": {"dynamic_pci_passthrough": True},
              },
          },
          "available_node_types": {
              "ray.head.default": {
                  "resources": {},
                  "node_config": {
                      "resource_pool": "ray",
                      "datastore": "vsan",
                  },
              },
              "worker": {"resources": {}, "node_config": {}},
              "worker1": {"resources": {}, "node_config": {}},
          },
          "head_node_type": "ray.head.default",
      }
  
      update_vsphere_configs(input_config)
      assert (
          "frozen_vm"
          in input_config["available_node_types"]["ray.head.default"][
              "node_config"
          ]
      )
      assert (
          "frozen_vm"
          in input_config["available_node_types"]["worker"][
              "node_config"
          ]
      )
      assert (
          "frozen_vm"
          in input_config["available_node_types"]["worker1"][
              "node_config"
          ]
      )
      assert (
          input_config["available_node_types"]["worker"]["node_config"][
              "frozen_vm"
          ]["name"]
          == "frozen"
      )
      assert (
          "dynamic_pci_passthrough"
          in input_config["available_node_types"]["ray.head.default"][
              "node_config"
          ]["gpu_config"]
      )
      assert (
          "dynamic_pci_passthrough"
          in input_config["available_node_types"]["worker"][
              "node_config"
          ]["gpu_config"]
      )
      assert (
          "dynamic_pci_passthrough"
          in input_config["available_node_types"]["worker1"][
              "node_config"
          ]["gpu_config"]
      )
      assert input_config["available_node_types"]["worker"][
          "node_config"
      ]["gpu_config"]["dynamic_pci_passthrough"]
  
imports: import copy
  import time
  import pytest
  import threading
  from unittest.mock import MagicMock, patch
  from ray.autoscaler._private.vsphere.node_provider import VsphereNodeProvider
  from ray.autoscaler._private.vsphere.config import update_vsphere_configs, validate_frozen_vm_configs
  from ray.autoscaler._private.vsphere.gpu_utils import split_vm_2_gpu_cards_map, GPUCard, set_gpu_placeholder
  from ray.autoscaler._private.vsphere.utils import singleton_client
label_desc: Use image node_id 8 for calling a global function with example usage: test_update_vsphere_configs() without return types