code: def test_singleton():
      @singleton_client
      class SingletonClass:
          def __init__(self, value):
              self.value = value
  
      singleton1 = SingletonClass(1)
      singleton1.ensure_connect = MagicMock()
      singleton2 = SingletonClass(2)
  
      assert singleton1 is singleton2
      singleton2.ensure_connect.assert_not_called()
      with patch("time.time", return_value=time.time() + 1000):
          singleton3 = SingletonClass(3)
          singleton3.ensure_connect.assert_called_once()
  
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 12 for calling a global function with example usage: test_singleton() without return types