class_docstr: A class used for getting runtime context.
docstr: Get current node ID for this worker or driver.
  
  Node ID is the id of a node that your driver, task, or actor runs.
  The ID will be in hex format.
  
  Returns:
      A node id in hex format for this worker or driver.
  
  Raises:
      AssertionError: If not called in a driver or worker. Generally,
          this means that ray.init() was not called.
docstr_tok: ["Get","current","node","ID","for","this","worker","or","driver",".","Node","ID","is","the","id","of","a","node","that","your","driver",",","task",",","or","actor","runs",".","The","ID","will","be","in","hex","format",".","Returns",":","A","node","id","in","hex","format","for","this","worker","or","driver",".","Raises",":","AssertionError",":","If","not","called","in","a","driver","or","worker",".","Generally",",","this","means","that","ray.init","(",")","was","not","called","."]
code: def get_node_id(self) -> str:
      """Get current node ID for this worker or driver.
  
      Node ID is the id of a node that your driver, task, or actor runs.
      The ID will be in hex format.
  
      Returns:
          A node id in hex format for this worker or driver.
  
      Raises:
          AssertionError: If not called in a driver or worker. Generally,
              this means that ray.init() was not called.
      """
      assert ray.is_initialized(), (
          "Node ID is not available because "
          "Ray has not been initialized."
      )
      node_id = self.worker.current_node_id
      return node_id.hex()
  
imports: import logging
  from typing import Any, Dict, List, Optional
  import ray._private.worker
  from ray._private.client_mode_hook import client_mode_hook
  from ray._private.utils import pasre_pg_formatted_resources_to_original
  from ray._raylet import TaskID
  from ray.runtime_env import RuntimeEnv
  from ray.util.annotations import Deprecated, PublicAPI
label_desc: Use image node_id 6 for calling the RuntimeContext obj's underlying member method code with example usage: obj.get_node_id() and returns: node_id