code: def test_storage_prefix_normalization(
      require_secrets: bool,
      tmp_path: Path,
      prefix: Union[None, str],
      expected_storage_prefix: str,
      should_fail: bool,
  ) -> None:
      """Test various inputs for storage prefix are normalized properly."""
  
      try:
          observed_prefix = normalize_prefix(prefix)
          assert (
              not should_fail
              and observed_prefix == expected_storage_prefix
          )
      except ValueError as exc:
          assert should_fail and "prefix must not match" in str(exc)
  
imports: import io
  import logging
  import os
  import uuid
  from pathlib import Path
  from typing import Dict, List, Optional, Union
  import botocore.exceptions
  import pytest
  from determined.common import storage
  from determined.common.storage.s3 import normalize_prefix
  from determined.tensorboard.fetchers.s3 import S3Fetcher
  from tests import parallel
  from tests.storage import util
label_desc: Use image node_id 2 for calling a global function with example usage: test_storage_prefix_normalization(require_secrets, tmp_path, prefix, expected_storage_prefix, should_fail) without return types