code: def __init__(self, provider_config, cluster_name):
      NodeProvider.__init__(self, provider_config, cluster_name)
      self.cache_stopped_nodes = provider_config.get(
          "cache_stopped_nodes", True
      )
      self.acs = AcsClient(
          access_key=provider_config["access_key"],
          access_key_secret=provider_config["access_key_secret"],
          region_id=provider_config["region"],
          max_retries=BOTO_MAX_RETRIES,
      )
  
      # Try availability zones round-robin, starting from random offset
      self.subnet_idx = random.randint(0, 100)
  
      # Tags that we believe to actually be on the node.
      self.tag_cache = {}
      # Tags that we will soon upload.
      self.tag_cache_pending = defaultdict(dict)
      # Number of threads waiting for a batched tag update.
      self.batch_thread_count = 0
      self.batch_update_done = threading.Event()
      self.batch_update_done.set()
      self.ready_for_new_batch = threading.Event()
      self.ready_for_new_batch.set()
      self.tag_cache_lock = threading.Lock()
      self.count_lock = threading.Lock()
  
      # Cache of node objects from the last nodes() call. This avoids
      # excessive DescribeInstances requests.
      self.cached_nodes = {}
  
imports: import logging
  import random
  import threading
  import time
  from collections import defaultdict
  from typing import Any, Dict, List, Optional
  from ray.autoscaler._private.aliyun.config import PENDING, RUNNING, STOPPED, STOPPING, bootstrap_aliyun
  from ray.autoscaler._private.aliyun.utils import AcsClient
  from ray.autoscaler._private.cli_logger import cli_logger
  from ray.autoscaler._private.constants import BOTO_MAX_RETRIES
  from ray.autoscaler._private.log_timer import LogTimer
  from ray.autoscaler.node_provider import NodeProvider
  from ray.autoscaler.tags import TAG_RAY_CLUSTER_NAME, TAG_RAY_LAUNCH_CONFIG, TAG_RAY_NODE_KIND, TAG_RAY_NODE_NAME, TAG_RAY_NODE_STATUS, TAG_RAY_USER_NODE_TYPE
label_desc: Use image node_id 1 to create a new AliyunNodeProvider object from inherited base classes: NodeProvider with example: obj = AliyunNodeProvider(provider_config, cluster_name)