code: def validate_manager(manager: StorageManager) -> None:
      """
      Validate that the StorageManager can be written to, restored from, and
      deleted from. Throws an exception if any of the operations fail.
      """
  
      storage_id = str(uuid.uuid4())
  
      with manager.store_path(storage_id) as path:
          path.mkdir(parents=True, exist_ok=True)
          with path.joinpath("VALIDATE.txt").open("w") as f:
              f.write(storage_id)
  
      with manager.restore_path(storage_id) as path:
          with path.joinpath("VALIDATE.txt").open("r") as f:
              if f.read() != storage_id:
                  raise ValueError(
                      "Unable to properly load from storage"
                  )
  
      manager.delete(storage_id, ["**/*"])
  
file_path: determined/harness/determined/common/storage/__init__.py
imports: import copy
  import uuid
  from typing import Any, Dict, Optional, Type
  from determined.common.storage.base import StorageManager, Paths, Selector, from_string
  from determined.common.storage.cloud import CloudStorageManager
  from determined.common.storage.azure import AzureStorageManager
  from determined.common.storage.gcs import GCSStorageManager
  from determined.common.storage.s3 import S3StorageManager
  from determined.common.storage.shared import SharedFSStorageManager
  from determined.common.storage.directory import DirectoryStorageManager
label_desc: Use image node_id 2 for calling a global function with example usage: validate_manager(manager) without return types