code: def test_non_terminated_nodes_returns_nodes_in_powered_off_creating_state(
      patch_vsphere_sdk_provider,
  ):
      cluster_name = "test"
      vsp = mock_vsphere_sdk_provider()
  
      vsp.vsphere_sdk_client.vcenter.VM.list.return_value = [
          MagicMock(vm="vm1"),
          MagicMock(vm="vm2"),
      ]
      vsp.vsphere_sdk_client.vcenter.vm.Power.get.side_effect = [
          MagicMock(state="POWERED_ON"),
          MagicMock(state="POWERED_OFF"),
      ]
      # The 2nd vm is powered off but is in creating status
      vsp.get_matched_tags = MagicMock(
          return_value=(
              {"ray-cluster-name": "test"},
              {
                  "ray-cluster-name": "test",
                  "custom-tag": "custom-value",
                  "vsphere-node-status": "creating",
              },
          )
      )
      # The tag filter is none
      nodes, tag_cache = vsp.non_terminated_nodes(cluster_name, {})
      assert len(nodes) == 2
  
file_path: ray/python/ray/tests/vsphere/test_vsphere_sdk_provider.py
imports: import pytest
  from unittest.mock import MagicMock, patch
  from ray.autoscaler._private.vsphere.vsphere_sdk_provider import VsphereSdkProvider, Constants, HardPower
label_desc: Use image node_id 5 for calling a global function with example usage: test_non_terminated_nodes_returns_nodes_in_powered_off_creating_state(patch_vsphere_sdk_provider) without return types