code: def test_node_providers_pass_through(self):
      nodes = self.node_provider.create_nodes("worker_nodes1", 1)
      assert len(nodes) == 1
      assert nodes[0] == Instance(
          instance_type="worker_nodes1",
          cloud_instance_id="0",
          internal_ip="172.0.0.0",
          external_ip="1.2.3.4",
          status=Instance.UNKNOWN,
      )
      self.assertEqual(len(self.base_provider.mock_nodes), 1)
      self.assertEqual(
          self.node_provider.get_non_terminated_nodes(), {"0": nodes[0]}
      )
      nodes1 = self.node_provider.create_nodes("worker_nodes", 2)
      assert len(nodes1) == 2
      assert nodes1[0] == Instance(
          instance_type="worker_nodes",
          cloud_instance_id="1",
          internal_ip="172.0.0.1",
          external_ip="1.2.3.4",
          status=Instance.UNKNOWN,
      )
      assert nodes1[1] == Instance(
          instance_type="worker_nodes",
          cloud_instance_id="2",
          internal_ip="172.0.0.2",
          external_ip="1.2.3.4",
          status=Instance.UNKNOWN,
      )
      self.assertEqual(
          self.node_provider.get_non_terminated_nodes(),
          {"0": nodes[0], "1": nodes1[0], "2": nodes1[1]},
      )
      self.assertEqual(
          self.node_provider.get_nodes_by_cloud_instance_id(["0"]),
          {
              "0": nodes[0],
          },
      )
      self.node_provider.terminate_node("0")
      self.assertEqual(
          self.node_provider.get_non_terminated_nodes(),
          {"1": nodes1[0], "2": nodes1[1]},
      )
      self.assertFalse(self.node_provider.is_readonly())
  
file_path: ray/python/ray/autoscaler/v2/tests/test_node_provider.py
imports: import os
  import sys
  import unittest
  import pytest
  from ray._private.test_utils import load_test_config
  from ray.autoscaler._private.event_summarizer import EventSummarizer
  from ray.autoscaler._private.node_launcher import BaseNodeLauncher
  from ray.autoscaler._private.node_provider_availability_tracker import NodeProviderAvailabilityTracker
  from ray.autoscaler.node_launch_exception import NodeLaunchException
  from ray.autoscaler.v2.instance_manager.config import AutoscalingConfig
  from ray.autoscaler.v2.instance_manager.node_provider import NodeProviderAdapter
  from ray.autoscaler.v2.tests.util import FakeCounter
  from ray.core.generated.instance_manager_pb2 import Instance
  from ray.tests.autoscaler_test_utils import MockProvider
label_desc: Use image node_id 2 for calling the NodeProviderTest obj's underlying member method code with example usage: obj.test_node_providers_pass_through() without return types