code: def get_or_create_autoscaling_requester_actor():
      ctx = DataContext.get_current()
      scheduling_strategy = ctx.scheduling_strategy
      # Pin the stats actor to the local node so it fate-shares with the driver.
      # Note: for Ray Client, the ray.get_runtime_context().get_node_id() should
      # point to the head node.
      scheduling_strategy = NodeAffinitySchedulingStrategy(
          ray.get_runtime_context().get_node_id(),
          soft=False,
      )
      with _autoscaling_requester_lock:
          return AutoscalingRequester.options(
              name="AutoscalingRequester",
              namespace="AutoscalingRequester",
              get_if_exists=True,
              lifetime="detached",
              scheduling_strategy=scheduling_strategy,
          ).remote()
  
file_path: ray/python/ray/data/_internal/execution/autoscaling_requester.py
imports: import math
  import threading
  import time
  from typing import Dict, List
  import ray
  from ray.data.context import DataContext
  from ray.util.scheduling_strategies import NodeAffinitySchedulingStrategy
label_desc: Use image node_id 1 for calling a global function with example usage: get_or_create_autoscaling_requester_actor() and returns: AutoscalingRequester