code: def mock_storage_context(
      exp_name: str = "exp_name",
      delete_syncer: bool = True,
      storage_path: Optional[str] = None,
      storage_context_cls: Type = StorageContext,
  ) -> StorageContext:
      storage_path = storage_path or tempfile.mkdtemp()
      exp_name = exp_name
      trial_name = "trial_name"
      storage = storage_context_cls(
          storage_path=storage_path,
          experiment_dir_name=exp_name,
          trial_dir_name=trial_name,
      )
      storage.storage_local_path = storage_path
      if delete_syncer:
          storage.syncer = None
      os.makedirs(
          os.path.join(storage_path, exp_name, trial_name),
          exist_ok=True,
      )
      return storage
  
file_path: ray/python/ray/train/tests/util.py
imports: import contextlib
  import os
  import tempfile
  from typing import Any, Dict, Optional, Type
  import ray.cloudpickle
  from ray.train import Checkpoint
  from ray.train._internal.storage import StorageContext
label_desc: Use image node_id 3 for calling a global function with example usage: mock_storage_context(exp_name, delete_syncer, storage_path, storage_context_cls) and returns: storage