code: def get_live_manager(
      require_secrets: bool, tmp_path: Path, prefix: Optional[str]
  ) -> storage.S3StorageManager:
      """Return a working S3StorageManager connected to a real bucket.
  
      S3 access may come from the user's normal filesystem authentication of from the
      AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.
  
      Note that we pass these variables as part of circleci's "storage-unit-tests" context.
  
      The circleci credentials belong to the "storage-unit-tests" user.  The contents of the key are
      at github.com/determined-ai/secrets/aws/access-keys/storage-unit-tests.csv.
  
      The user only has premissions to read/write the "storage-unit-tests" bucket.
      """
  
      try:
          # AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are read from the environment automatically.
          manager = storage.S3StorageManager(
              bucket=BUCKET_NAME,
              access_key=None,
              secret_key=None,
              prefix=prefix,
              temp_dir=str(tmp_path),
          )
          out = io.BytesIO()
          manager.bucket.download_fileobj(CHECK_ACCESS_KEY, out)
          assert out.getvalue() == CHECK_KEY_CONTENT
          return manager
      except (
          botocore.exceptions.NoCredentialsError,
          botocore.exceptions.PartialCredentialsError,
      ):
          # No access detected.
          if require_secrets:
              raise
          pytest.skip("No S3 access")
  
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 1 for calling a global function with example usage: get_live_manager(require_secrets, tmp_path, prefix) and returns: manager