code: def upload_file_to_all_nodes(path: str):
      path = os.path.abspath(path)
  
      with open(path, "rb") as f:
          stream = f.read()
  
      futures = schedule_remote_fn_on_all_nodes(
          _write, exclude_head=True, stream=stream, path=path
      )
      return ray.get(futures)
  
imports: import os
  import socket
  import subprocess
  from collections import defaultdict
  from contextlib import closing
  from pathlib import Path
  from ray.air.util.node import _force_on_node
  import ray
  from typing import Any, List, Dict, Union, Callable
label_desc: Use image node_id 3 for calling a global function with example usage: upload_file_to_all_nodes(path) and returns: ray