class_docstr: Create a local autoscaling cluster for testing.
  
  See test_autoscaler_fake_multinode.py for an end-to-end example.
docstr: Create the cluster.
  
  Args:
      head_resources: resources of the head node, including CPU.
      worker_node_types: autoscaler node types config for worker nodes.
docstr_tok: ["Create","the","cluster",".","Args",":","head_resources",":","resources","of","the","head","node",",","including","CPU",".","worker_node_types",":","autoscaler","node","types","config","for","worker","nodes","."]
code: def __init__(
      self,
      head_resources: dict,
      worker_node_types: dict,
      **config_kwargs,
  ):
      """Create the cluster.
  
      Args:
          head_resources: resources of the head node, including CPU.
          worker_node_types: autoscaler node types config for worker nodes.
      """
      self._head_resources = head_resources
      self._config = self._generate_config(
          head_resources, worker_node_types, **config_kwargs
      )
  
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 1 to create a new AutoscalingCluster object  with example: obj = AutoscalingCluster(head_resources, worker_node_types)