code: def test_worker_group_index(group_name, expected_index):
      """Basic unit test for _worker_group_index.
  
      Uses a RayCluster CR with worker groups "small-group" and "gpu-group",
      listed in that order.
      """
      raycluster_cr = get_basic_ray_cr()
      assert (
          _worker_group_index(raycluster_cr, group_name)
          == expected_index
      )
  
imports: import copy
  import mock
  import sys
  import jsonpatch
  import pytest
  from ray.autoscaler.batching_node_provider import NodeData
  from ray.autoscaler._private.kuberay.node_provider import _worker_group_index, _worker_group_max_replicas, _worker_group_replicas, KubeRayNodeProvider, ScaleRequest
  from ray.autoscaler._private.util import NodeID
  from pathlib import Path
  import yaml
  from ray.tests.kuberay.test_autoscaling_config import get_basic_ray_cr
  from typing import Set, List
label_desc: Use image node_id 3 for calling a global function with example usage: test_worker_group_index(group_name, expected_index) without return types