code: def _append_default_spilling_dir_config(
      head_node_options, object_spilling_dir
  ):
      if "system_config" not in head_node_options:
          head_node_options["system_config"] = {}
      sys_conf = head_node_options["system_config"]
      if "object_spilling_config" not in sys_conf:
          sys_conf["object_spilling_config"] = json.dumps(
              {
                  "type": "filesystem",
                  "params": {
                      "directory_path": object_spilling_dir,
                  },
              }
          )
      return head_node_options
  
imports: import copy
  import yaml
  import json
  import os
  import socket
  import sys
  import time
  import threading
  import logging
  import uuid
  import warnings
  import requests
  from packaging.version import Version
  from typing import Optional, Dict, Tuple, Type
  import ray
  import ray._private.services
  from ray.autoscaler._private.spark.node_provider import HEAD_NODE_ID
  from ray.util.annotations import DeveloperAPI, PublicAPI
  from ray._private.storage import _load_class
  from .utils import exec_cmd, is_port_in_use, get_random_unused_port, get_spark_session, get_spark_application_driver_host, is_in_databricks_runtime, get_spark_task_assigned_physical_gpus, get_avail_mem_per_ray_worker_node, get_max_num_concurrent_tasks, gen_cmd_exec_failure_msg, calc_mem_ray_head_node, _wait_service_up
  from .start_hook_base import RayOnSparkStartHook
  from .databricks_hook import DefaultDatabricksRayOnSparkStartHook
  from threading import Event
label_desc: Use image node_id 5 for calling a global function with example usage: _append_default_spilling_dir_config(head_node_options, object_spilling_dir) and returns: head_node_options