code: def _get_ray_cr_with_overrides() -> dict:
      """CR with memory, cpu, and gpu overrides from rayStartParams."""
      cr = get_basic_ray_cr()
      cr["spec"]["workerGroupSpecs"][0]["rayStartParams"][
          "memory"
      ] = "300000000"
      # num-gpus rayStartParam with no gpus in container limits
      cr["spec"]["workerGroupSpecs"][0]["rayStartParams"][
          "num-gpus"
      ] = "100"
      # num-gpus rayStartParam overriding gpus in container limits
      cr["spec"]["workerGroupSpecs"][1]["rayStartParams"][
          "num-gpus"
      ] = "100"
      cr["spec"]["workerGroupSpecs"][0]["rayStartParams"][
          "num-cpus"
      ] = "100"
      return cr
  
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 5 for calling a global function with example usage: _get_ray_cr_with_overrides() and returns: cr