code: def test_cr_image_consistency():
      """Verify that the example config uses the same Ray image for all Ray pods."""
      cr = get_basic_ray_cr()
  
      group_specs = [cr["spec"]["headGroupSpec"]] + cr["spec"][
          "workerGroupSpecs"
      ]
      # Head, CPU group, GPU group.
      assert len(group_specs) == 3
  
      ray_containers = [
          group_spec["template"]["spec"]["containers"][0]
          for group_spec in group_specs
      ]
  
      # All Ray containers in the example config have "ray-" in their name.
      assert all(
          "ray-" in ray_container["name"]
          for ray_container in ray_containers
      )
  
      # All Ray images are from the Ray repo.
      assert all(
          "rayproject/ray" in ray_container["image"]
          for ray_container in ray_containers
      )
  
      # All Ray images are the same.
      assert (
          len(
              {
                  ray_container["image"]
                  for ray_container in ray_containers
              }
          )
          == 1
      )
  
imports: import copy
  from pathlib import Path
  import requests
  from typing import Any, Dict, Optional
  from unittest import mock
  import platform
  import pytest
  import yaml
  from ray.autoscaler._private.kuberay.autoscaling_config import _derive_autoscaling_config_from_ray_cr, AutoscalingConfigProducer, _round_up_k8s_quantity
label_desc: Use image node_id 13 for calling a global function with example usage: test_cr_image_consistency() without return types