code: def test_autoscaling_config_generation(self):
      from ray.util.spark.cluster_init import AutoscalingCluster
  
      autoscaling_cluster = AutoscalingCluster(
          head_resources={
              "CPU": 3,
              "GPU": 4,
              "memory": 10000000,
              "object_store_memory": 20000000,
          },
          worker_node_types={
              "ray.worker": {
                  "resources": {
                      "CPU": 5,
                      "GPU": 6,
                      "memory": 30000000,
                      "object_store_memory": 40000000,
                  },
                  "node_config": {},
                  "min_workers": 0,
                  "max_workers": 100,
              },
          },
          extra_provider_config={
              "extra_aa": "abc",
              "extra_bb": 789,
          },
          upscaling_speed=2.0,
          idle_timeout_minutes=3.0,
      )
  
      config = autoscaling_cluster._config
  
      assert config["max_workers"] == 100
  
      assert config["available_node_types"]["ray.head.default"] == {
          "resources": {
              "CPU": 3,
              "GPU": 4,
              "memory": 10000000,
              "object_store_memory": 20000000,
          },
          "node_config": {},
          "max_workers": 0,
      }
      assert config["available_node_types"]["ray.worker"] == {
          "resources": {
              "CPU": 5,
              "GPU": 6,
              "memory": 30000000,
              "object_store_memory": 40000000,
          },
          "node_config": {},
          "min_workers": 0,
          "max_workers": 100,
      }
      assert config["upscaling_speed"] == 2.0
      assert config["idle_timeout_minutes"] == 3.0
      assert config["provider"]["extra_aa"] == "abc"
      assert config["provider"]["extra_bb"] == 789
  
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 6 for calling the TestSparkLocalCluster obj's underlying member method code with example usage: obj.test_autoscaling_config_generation() without return types