class_docstr: Mock implementation of a BatchingNodeProvider.
docstr: Simulate modification of cluster state by an external cluster manager.
docstr_tok: ["Simulate","modification","of","cluster","state","by","an","external","cluster","manager","."]
code: def submit_scale_request(self, scale_request: ScaleRequest) -> None:
      """Simulate modification of cluster state by an external cluster manager."""
      self._scale_request_submitted_count += 1
      # Delete workers.
      for node_id in self.scale_request.workers_to_delete:
          del self._node_data_dict[node_id]
      # Get counts of workers after the deletion.
      cur_num_workers = self._cur_num_workers(self._node_data_dict)
      for node_type in self.scale_request.desired_num_workers:
          # How many nodes to add.
          diff = (
              self.scale_request.desired_num_workers[node_type]
              - cur_num_workers[node_type]
          )
          # The next assertion validates the node provider and the test structure.
          # After removing nodes to terminate, there should be no more
          # nodes to terminate!
          assert diff >= 0, diff
          for _ in range(diff):
              self._add_node(node_type, NODE_KIND_WORKER)
  
imports: from copy import copy
  from uuid import uuid4
  import os
  import random
  import sys
  from typing import Any, Dict
  from collections import defaultdict
  import pytest
  from ray.autoscaler.batching_node_provider import BatchingNodeProvider, NodeData, ScaleRequest
  from ray.autoscaler._private.util import NodeID, NodeType
  from ray.autoscaler.tags import STATUS_UP_TO_DATE, TAG_RAY_USER_NODE_TYPE, TAG_RAY_NODE_KIND, TAG_RAY_NODE_STATUS, NODE_KIND_HEAD, NODE_KIND_WORKER
  from ray.autoscaler._private.constants import DISABLE_LAUNCH_CONFIG_CHECK_KEY, DISABLE_NODE_UPDATERS_KEY, FOREGROUND_NODE_LAUNCH_KEY
label_desc: Use image node_id 3 for calling the MockBatchingNodeProvider obj's underlying member method code with example usage: obj.submit_scale_request(scale_request) without return types