class_docstr: Interface for getting and returning nodes from a Cloud.
  
  **Important**: This is an INTERNAL API that is only exposed for the purpose
  of implementing custom node providers. It is not allowed to call into
  NodeProvider methods from any Ray package outside the autoscaler, only to
  define new implementations of NodeProvider for use with the "external" node
  provider option.
  
  NodeProviders are namespaced by the `cluster_name` parameter; they only
  operate on nodes within that namespace.
  
  Nodes may be in one of three states: {pending, running, terminated}. Nodes
  appear immediately once started by `create_node`, and transition
  immediately to terminated when `terminate_node` is called.
class_docstr_tok: ["Interface","for","getting","and","returning","nodes","from","a","Cloud",".","*","*","Important","*","*",":","This","is","an","INTERNAL","API","that","is","only","exposed","for","the","purpose","of","implementing","custom","node","providers",".","It","is","not","allowed","to","call","into","NodeProvider","methods","from","any","Ray","package","outside","the","autoscaler",",","only","to","define","new","implementations","of","NodeProvider","for","use","with","the","``","external","''","node","provider","option",".","NodeProviders","are","namespaced","by","the","`","cluster_name","`","parameter",";","they","only","operate","on","nodes","within","that","namespace",".","Nodes","may","be","in","one","of","three","states",":","{","pending",",","running",",","terminated","}",".","Nodes","appear","immediately","once","started","by","`","create_node","`",",","and","transition","immediately","to","terminated","when","`","terminate_node","`","is","called","."]
docstr: Return a list of node ids filtered by the specified tags dict.
  
  This list must not include terminated nodes. For performance reasons,
  providers are allowed to cache the result of a call to
  non_terminated_nodes() to serve single-node queries
  (e.g. is_running(node_id)). This means that non_terminate_nodes() must
  be called again to refresh results.
  
  Examples:
      >>> from ray.autoscaler.node_provider import NodeProvider
      >>> from ray.autoscaler.tags import TAG_RAY_NODE_KIND
      >>> provider = NodeProvider(...) # doctest: +SKIP
      >>> provider.non_terminated_nodes( # doctest: +SKIP
      ...     {TAG_RAY_NODE_KIND: "worker"})
      ["node-1", "node-2"]
docstr_tok: ["Return","a","list","of","node","ids","filtered","by","the","specified","tags","dict",".","This","list","must","not","include","terminated","nodes",".","For","performance","reasons",",","providers","are","allowed","to","cache","the","result","of","a","call","to","non_terminated_nodes","(",")","to","serve","single-node","queries","(","e.g",".","is_running","(","node_id",")",")",".","This","means","that","non_terminate_nodes","(",")","must","be","called","again","to","refresh","results",".","Examples",":",">",">",">","from","ray.autoscaler.node_provider","import","NodeProvider",">",">",">","from","ray.autoscaler.tags","import","TAG_RAY_NODE_KIND",">",">",">","provider","=","NodeProvider","(","...",")","#","doctest",":","+SKIP",">",">",">","provider.non_terminated_nodes","(","#","doctest",":","+SKIP","...","{","TAG_RAY_NODE_KIND",":","``","worker","''","}",")","[","``","node-1","''",",","``","node-2","''","]"]
code: def non_terminated_nodes(
      self, tag_filters: Dict[str, str]
  ) -> List[str]:
      """Return a list of node ids filtered by the specified tags dict.
  
      This list must not include terminated nodes. For performance reasons,
      providers are allowed to cache the result of a call to
      non_terminated_nodes() to serve single-node queries
      (e.g. is_running(node_id)). This means that non_terminate_nodes() must
      be called again to refresh results.
  
      Examples:
          >>> from ray.autoscaler.node_provider import NodeProvider
          >>> from ray.autoscaler.tags import TAG_RAY_NODE_KIND
          >>> provider = NodeProvider(...) # doctest: +SKIP
          >>> provider.non_terminated_nodes( # doctest: +SKIP
          ...     {TAG_RAY_NODE_KIND: "worker"})
          ["node-1", "node-2"]
  
      """
      raise NotImplementedError
  
imports: import logging
  from types import ModuleType
  from typing import Any, Dict, List, Optional
  from ray.autoscaler._private.command_runner import DockerCommandRunner, SSHCommandRunner
  from ray.autoscaler.command_runner import CommandRunnerInterface
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 3 for calling the NodeProvider obj's underlying member method code with example usage: obj.non_terminated_nodes(tag_filters) without return types