code: def get_ray_worker_resources_list():
      wr_list = []
      for node in ray.nodes():
          # exclude dead node and head node (with 0 CPU resource)
          if node["Alive"] and node["Resources"].get("CPU", 0) > 0:
              wr_list.append(node["Resources"])
      return wr_list
  
imports: import os
  import shutil
  import tempfile
  import socket
  import threading
  import re
  import pytest
  import sys
  from unittest import mock
  from abc import ABC
  import ray
  import ray.util.spark.cluster_init
  from ray.util.spark import setup_ray_cluster, shutdown_ray_cluster, setup_global_ray_cluster, MAX_NUM_WORKER_NODES
  from ray.util.spark.utils import is_port_in_use, _calc_mem_per_ray_worker_node
  from pyspark.sql import SparkSession
  import time
  import logging
  from contextlib import contextmanager
  from ray._private.test_utils import wait_for_condition
label_desc: Use image node_id 2 for calling the RayOnSparkCPUClusterTestBase obj's underlying member method code with example usage: obj.get_ray_worker_resources_list() and returns: wr_list