code: def test_create_new_or_fetch_existing_frozen_vms():
      vnp = mock_vsphere_node_provider()
      vnp.ensure_frozen_vm_status = MagicMock()
      vnp.create_frozen_vm_from_ovf = MagicMock()
      vnp.create_frozen_vm_on_each_host = MagicMock()
      vnp.get_pyvmomi_sdk_provider().get_pyvmomi_obj.return_value = (
          MagicMock(vm=[MagicMock(), MagicMock()])
      )
      node_config = {"frozen_vm": {"name": "frozen"}}
      vnp.create_new_or_fetch_existing_frozen_vms(node_config)
      vnp.ensure_frozen_vm_status.assert_called()
  
      node_config = {
          "frozen_vm": {"name": "frozen", "resource_pool": "frozen-rp"}
      }
      vnp.create_new_or_fetch_existing_frozen_vms(node_config)
  
      node_config = {
          "frozen_vm": {"name": "frozen", "library_item": "frozen"}
      }
      vnp.create_new_or_fetch_existing_frozen_vms(node_config)
      vnp.create_frozen_vm_from_ovf.assert_called()
  
      node_config = {
          "frozen_vm": {
              "name": "frozen",
              "library_item": "frozen",
              "resource_pool": "frozen-rp",
          }
      }
      vnp.create_new_or_fetch_existing_frozen_vms(node_config)
      vnp.create_frozen_vm_on_each_host.assert_called()
  
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 7 for calling a global function with example usage: test_create_new_or_fetch_existing_frozen_vms() without return types