code: def __init__(self, cache_stopped=False, unique_ips=False):
      self.mock_nodes = {}
      self.next_id = 0
      self.throw = False
      self.error_creates = None
      self.fail_creates = False
      self.ready_to_create = threading.Event()
      self.ready_to_create.set()
      self.cache_stopped = cache_stopped
      self.unique_ips = unique_ips
      self.fail_to_fetch_ip = False
      self.safe_to_scale_flag = True
      self.partical_success_count = None
      # Many of these functions are called by node_launcher or updater in
      # different threads. This can be treated as a global lock for
      # everything.
      self.lock = threading.Lock()
      self.num_non_terminated_nodes_calls = 0
      super().__init__(None, None)
  
imports: import re
  import threading
  from subprocess import CalledProcessError
  from typing import Callable, Dict, List, Optional
  from ray.autoscaler.node_provider import NodeProvider
label_desc: Use image node_id 1 to create a new MockProvider object from inherited base classes: NodeProvider with example: obj = MockProvider(cache_stopped, unique_ips)