class_docstr: Stores artifacts on Azure Blob Storage.
  
  This repository is used with URIs of the form
  ``wasbs://<container-name>@<ystorage-account-name>.blob.core.windows.net/<path>``,
  following the same URI scheme as Hadoop on Azure blob storage. It requires either that:
  - Azure storage connection string is in the env var ``AZURE_STORAGE_CONNECTION_STRING``
  - Azure storage access key is in the env var ``AZURE_STORAGE_ACCESS_KEY``
  - DefaultAzureCredential is configured
class_docstr_tok: ["Stores","artifacts","on","Azure","Blob","Storage",".","This","repository","is","used","with","URIs","of","the","form","``","wasbs",":","\/\/","<","container-name",">","@","<","ystorage-account-name",">",".blob.core.windows.net\/","<","path",">","``",",","following","the","same","URI","scheme","as","Hadoop","on","Azure","blob","storage",".","It","requires","either","that",":","-","Azure","storage","connection","string","is","in","the","env","var","``","AZURE_STORAGE_CONNECTION_STRING","``","-","Azure","storage","access","key","is","in","the","env","var","``","AZURE_STORAGE_ACCESS_KEY","``","-","DefaultAzureCredential","is","configured"]
code: def create_multipart_upload(
      self, local_file, num_parts=1, artifact_path=None
  ):
      from azure.storage.blob import (
          BlobSasPermissions,
          generate_blob_sas,
      )
  
      (container, _, dest_path, _) = self.parse_wasbs_uri(
          self.artifact_uri
      )
      if artifact_path:
          dest_path = posixpath.join(dest_path, artifact_path)
      dest_path = posixpath.join(
          dest_path, os.path.basename(local_file)
      )
  
      # Put Block: https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id
      # SDK: https://learn.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.blobclient?view=azure-python#azure-storage-blob-blobclient-stage-block
      blob_url = posixpath.join(self.client.url, container, dest_path)
      sas_token = generate_blob_sas(
          account_name=self.client.account_name,
          container_name=container,
          blob_name=dest_path,
          account_key=self.client.credential.account_key,
          permission=BlobSasPermissions(read=True, write=True),
          expiry=datetime.datetime.utcnow()
          + datetime.timedelta(hours=1),
      )
      credentials = []
      for i in range(1, num_parts + 1):
          block_id = f"mlflow_block_{i}"
          # see https://github.com/Azure/azure-sdk-for-python/blob/18a66ef98c6f2153491489d3d7d2fe4a5849e4ac/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py#L2468
          safe_block_id = urllib.parse.quote(
              encode_base64(block_id), safe=""
          )
          url = f"{blob_url}?comp=block&blockid={safe_block_id}&{sas_token}"
          credentials.append(
              MultipartUploadCredential(
                  url=url,
                  part_number=i,
                  headers={},
              )
          )
      return CreateMultipartUploadResponse(
          credentials=credentials,
          upload_id=None,
      )
  
imports: import base64
  import datetime
  import os
  import posixpath
  import re
  import urllib.parse
  from typing import Union
  from mlflow.entities import FileInfo
  from mlflow.entities.multipart_upload import CreateMultipartUploadResponse, MultipartUploadCredential
  from mlflow.environment_variables import MLFLOW_ARTIFACT_UPLOAD_DOWNLOAD_TIMEOUT
  from mlflow.exceptions import MlflowException
  from mlflow.store.artifact.artifact_repo import ArtifactRepository, MultipartUploadMixin
  from mlflow.tracking._tracking_service.utils import _get_default_host_creds
label_desc: Use image node_id 8 for calling the AzureBlobArtifactRepository obj's underlying member method code with example usage: obj.create_multipart_upload(local_file, num_parts, artifact_path) and returns: CreateMultipartUploadResponse