class_docstr: Create a local autoscaling cluster for testing.
  
  See test_autoscaler_fake_multinode.py for an end-to-end example.
code: def _generate_config(
      self, head_resources, worker_node_types, **config_kwargs
  ):
      base_config = yaml.safe_load(
          open(
              os.path.join(
                  os.path.dirname(ray.__file__),
                  "autoscaler/_private/fake_multi_node/example.yaml",
              )
          )
      )
      custom_config = copy.deepcopy(base_config)
      custom_config["available_node_types"] = worker_node_types
      custom_config["available_node_types"]["ray.head.default"] = {
          "resources": head_resources,
          "node_config": {},
          "max_workers": 0,
      }
      custom_config.update(config_kwargs)
      return custom_config
  
imports: import copy
  import json
  import logging
  import os
  import subprocess
  import tempfile
  import time
  from typing import Dict, Optional
  import yaml
  import ray
  import ray._private.services
  from ray._private import ray_constants
  from ray._private.client_mode_hook import disable_client_hook
  from ray._raylet import GcsClientOptions
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 2 for calling the AutoscalingCluster obj's underlying member method code with example usage: obj._generate_config(head_resources, worker_node_types) and returns: custom_config