code: def random_zip_file_with_top_level_dir(tmp_path):
      path = tmp_path
      top_level_dir = path / TOP_LEVEL_DIR_NAME
      top_level_dir.mkdir(parents=True)
      next_level_dir = top_level_dir
      for _ in range(10):
          p1 = next_level_dir / random_string(10)
          with p1.open("w") as f1:
              f1.write(random_string(100))
          p2 = next_level_dir / random_string(10)
          with p2.open("w") as f2:
              f2.write(random_string(200))
          dir1 = next_level_dir / random_string(15)
          dir1.mkdir(parents=True)
          dir2 = next_level_dir / random_string(15)
          dir2.mkdir(parents=True)
          next_level_dir = dir2
  
      # Add __MACOSX directory. This is a hidden directory that is created by
      # macOS when zipping a directory.
      macos_dir = path / MAC_OS_ZIP_HIDDEN_DIR_NAME
      macos_dir.mkdir(parents=True)
      with (macos_dir / "file").open("w") as f:
          f.write("macos file")
  
      make_archive(
          path / ARCHIVE_NAME[: ARCHIVE_NAME.rfind(".")],
          "zip",
          path,
          TOP_LEVEL_DIR_NAME,
      )
      yield str(path / ARCHIVE_NAME)
  
imports: import os
  import random
  import shutil
  import socket
  import string
  import sys
  import tempfile
  import uuid
  from filecmp import dircmp
  from pathlib import Path
  from shutil import copytree, make_archive, rmtree
  import zipfile
  import ray
  import pytest
  from ray._private.gcs_utils import GcsAioClient
  from ray._private.ray_constants import KV_NAMESPACE_PACKAGE, RAY_RUNTIME_ENV_IGNORE_GITIGNORE
  from ray._private.runtime_env.packaging import GCS_STORAGE_MAX_SIZE, MAC_OS_ZIP_HIDDEN_DIR_NAME, Protocol, _dir_travel, _get_excludes, _store_package_in_gcs, download_and_unpack_package, get_local_dir_from_uri, get_top_level_dir_from_compressed_package, get_uri_for_directory, get_uri_for_package, is_whl_uri, is_zip_uri, parse_uri, remove_dir_from_filepaths, unzip_package, upload_package_if_needed, _get_gitignore, upload_package_to_gcs
  from ray.experimental.internal_kv import _initialize_internal_kv, _internal_kv_del, _internal_kv_exists, _internal_kv_get, _internal_kv_reset
label_desc: Use image node_id 5 for calling a global function with example usage: random_zip_file_with_top_level_dir(tmp_path) without return types