code: def node_affinity_func():
      return ray.get_runtime_context().get_node_id()
  
file_path: ray/doc/source/ray-core/doc_code/scheduling.py
imports: import ray
label_desc: Use image node_id 3 for calling a global function with example usage: node_affinity_func() and returns: ray