code: def get_live_azure_manager(
      require_secrets: bool, tmp_path: Path
  ) -> storage.AzureStorageManager:
      """Return a working AzureStorageManager connected to a real bucket.
  
      Check for the environment variable we pass as part of circleci's "storage-unit-tests" context.
  
      Note that the Azure credentials in the "storage-unit-tests" context are available at the
      following location:
  
      github.com/determined-ai/secrets/blob/master/azure/connection-strings/storage-unit-tests.txt
  
      The service account should only have permission to view the "storage-unit-tests" bucket.
  
      Note: this connection_string can be set via the DET_AZURE_TEST_CREDS environment variable.
      """
      connection_string = os.environ.get("DET_AZURE_TEST_CREDS")
  
      import azure.core.exceptions
  
      try:
          manager = storage.AzureStorageManager(
              CONTAINER_NAME, connection_string
          )
          with tempfile.TemporaryDirectory() as tmp_dirname:
              tmp_filepath = os.path.join(tmp_dirname, "access.file")
              manager.client.get(
                  CONTAINER_NAME, CHECK_ACCESS_KEY, tmp_filepath
              )
  
              with open(tmp_filepath, "rb") as f:
                  data = f.read()
                  assert data == CHECK_KEY_CONTENT
  
          return manager
  
      except (
          ValueError,
          azure.core.exceptions.ClientAuthenticationError,
          azure.core.exceptions.ResourceNotFoundError,
      ):
          if require_secrets:
              raise
          pytest.skip("No Azure access")
  
file_path: determined/harness/tests/storage/test_azure.py
imports: import io
  import os
  import tempfile
  import uuid
  from pathlib import Path
  from typing import Dict, List
  import pytest
  from determined.common import storage
  from determined.tensorboard.fetchers.azure import AzureFetcher
  from tests.storage import util
label_desc: Use image node_id 1 for calling a global function with example usage: get_live_azure_manager(require_secrets, tmp_path) and returns: manager