code: def _shared_storage_path() -> pathlib.Path:
      """Returns the shared path through which the Copier threads move files from one Work filesystem to another.
  
      The shared path gets set by the environment. Locally, it is pointing to a directory determined by the
      ``SHARED_MOUNT_DIRECTORY`` environment variable. In the cloud, the shared path will point to a S3 bucket. All Works
      have access to this shared dropbox.
  
      """
      storage_path = os.getenv("LIGHTNING_STORAGE_PATH", "")
      if storage_path != "":
          return pathlib.Path(storage_path)
  
      # TODO[dmitsf]: this logic is still needed for compatibility reasons.
      # We should remove it after some time.
      bucket_name = os.getenv("LIGHTNING_BUCKET_NAME", "")
      app_id = os.getenv("LIGHTNING_CLOUD_APP_ID", "")
  
      if bucket_name != "" and app_id != "":
          return pathlib.Path(f"{bucket_name}/lightningapps/{app_id}")
  
      return _shared_local_mount_path()
  
imports: import hashlib
  import os
  import pathlib
  import shutil
  import sys
  from time import sleep
  from typing import TYPE_CHECKING, Any, List, Optional, Sequence, Union
  from fsspec import AbstractFileSystem
  from fsspec.implementations.local import LocalFileSystem
  from lightning.app.core.constants import REMOTE_STORAGE_WAIT
  from lightning.app.core.queues import BaseQueue
  from lightning.app.storage.requests import _ExistsRequest, _ExistsResponse, _GetRequest, _GetResponse
  from lightning.app.utilities.app_helpers import Logger
  from lightning.app.utilities.component import _is_flow_context
  from lightning.app.utilities.imports import _is_s3fs_available
label_desc: Use image node_id 4 for calling a global function with example usage: _shared_storage_path() and returns: _shared_local_mount_path, pathlib, pathlib