code: def non_terminated_nodes(self, tag_filters):
      # Note that these filters are acceptable because they are set on
      #       node initialization, and so can never be sitting in the cache.
      tag_filters = to_aws_format(tag_filters)
      filters = [
          {
              "Name": "instance-state-name",
              "Values": ["pending", "running"],
          },
          {
              "Name": "tag:{}".format(TAG_RAY_CLUSTER_NAME),
              "Values": [self.cluster_name],
          },
      ]
      for k, v in tag_filters.items():
          filters.append(
              {
                  "Name": "tag:{}".format(k),
                  "Values": [v],
              }
          )
  
      with boto_exception_handler(
          "Failed to fetch running instances from AWS."
      ):
          nodes = list(self.ec2.instances.filter(Filters=filters))
  
      # Populate the tag cache with initial information if necessary
      for node in nodes:
          if node.id in self.tag_cache:
              continue
  
          self.tag_cache[node.id] = from_aws_format(
              {x["Key"]: x["Value"] for x in node.tags}
          )
  
      self.cached_nodes = {node.id: node for node in nodes}
      return [node.id for node in nodes]
  
imports: import copy
  import logging
  import sys
  import threading
  import time
  from collections import OrderedDict, defaultdict
  from typing import Any, Dict, List
  import botocore
  from boto3.resources.base import ServiceResource
  import ray
  import ray._private.ray_constants
  from ray.autoscaler._private.aws.cloudwatch.cloudwatch_helper import CLOUDWATCH_AGENT_INSTALLED_AMI_TAG, CLOUDWATCH_AGENT_INSTALLED_TAG, CloudwatchHelper
  from ray.autoscaler._private.aws.config import bootstrap_aws
  from ray.autoscaler._private.aws.utils import boto_exception_handler, client_cache, resource_cache
  from ray.autoscaler._private.cli_logger import cf, cli_logger
  from ray.autoscaler._private.constants import BOTO_CREATE_MAX_RETRIES, BOTO_MAX_RETRIES
  from ray.autoscaler._private.log_timer import LogTimer
  from ray.autoscaler.node_launch_exception import NodeLaunchException
  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_USER_NODE_TYPE
label_desc: Use image node_id 2 for calling the AWSNodeProvider obj's underlying member method code with example usage: obj.non_terminated_nodes(tag_filters) and returns: unknown