class_docstr: Stores artifacts on Azure Data Lake Storage Gen2.
  
  This repository is used with URIs of the form
  ``abfs[s]://file_system@account_name.dfs.core.windows.net/<path>/<path>``.
  
  :param credential: Azure credential (see options in https://learn.microsoft.com/en-us/python/api/azure-core/azure.core.credentials?view=azure-python)
                     to use to authenticate to storage
class_docstr_tok: ["Stores","artifacts","on","Azure","Data","Lake","Storage","Gen2",".","This","repository","is","used","with","URIs","of","the","form","``","abfs","[","s","]",":","\/\/file_system","@","account_name.dfs.core.windows.net\/","<","path",">","\/","<","path",">","``",".",":","param","credential",":","Azure","credential","(","see","options","in","https",":","\/\/learn.microsoft.com\/en-us\/python\/api\/azure-core\/azure.core.credentials","?","view=azure-python",")","to","use","to","authenticate","to","storage"]
docstr: Uploads a file to a given Azure storage location using the ADLS gen2 API.
docstr_tok: ["Uploads","a","file","to","a","given","Azure","storage","location","using","the","ADLS","gen2","API","."]
code: def _multipart_upload(
      self, credentials, src_file_path, artifact_file_path
  ):
      """
      Uploads a file to a given Azure storage location using the ADLS gen2 API.
      """
      try:
          headers = self._extract_headers_from_credentials(
              credentials.headers
          )
          # try to create the file
          self._retryable_adls_function(
              func=put_adls_file_creation,
              artifact_file_path=artifact_file_path,
              sas_url=credentials.signed_uri,
              headers=headers,
          )
          # next try to append the file
          futures = {}
          file_size = os.path.getsize(src_file_path)
          num_chunks = _compute_num_chunks(
              src_file_path, MLFLOW_MULTIPART_UPLOAD_CHUNK_SIZE.get()
          )
          use_single_part_upload = num_chunks == 1
          for index in range(num_chunks):
              start_byte = (
                  index * MLFLOW_MULTIPART_UPLOAD_CHUNK_SIZE.get()
              )
              future = self.chunk_thread_pool.submit(
                  self._retryable_adls_function,
                  func=patch_adls_file_upload,
                  artifact_file_path=artifact_file_path,
                  sas_url=credentials.signed_uri,
                  local_file=src_file_path,
                  start_byte=start_byte,
                  size=MLFLOW_MULTIPART_UPLOAD_CHUNK_SIZE.get(),
                  position=start_byte,
                  headers=headers,
                  is_single=use_single_part_upload,
              )
              futures[future] = index
  
          _, errors = _complete_futures(futures, src_file_path)
          if errors:
              raise MlflowException(
                  f"Failed to upload at least one part of {artifact_file_path}. Errors: {errors}"
              )
  
          # finally try to flush the file
          if not use_single_part_upload:
              self._retryable_adls_function(
                  func=patch_adls_flush,
                  artifact_file_path=artifact_file_path,
                  sas_url=credentials.signed_uri,
                  position=file_size,
                  headers=headers,
              )
      except Exception as err:
          raise MlflowException(err)
  
imports: import os
  import posixpath
  import re
  import urllib.parse
  from typing import List
  import requests
  from mlflow.azure.client import patch_adls_file_upload, patch_adls_flush, put_adls_file_creation
  from mlflow.entities import FileInfo
  from mlflow.environment_variables import MLFLOW_ARTIFACT_UPLOAD_DOWNLOAD_TIMEOUT, MLFLOW_ENABLE_MULTIPART_UPLOAD, MLFLOW_MULTIPART_UPLOAD_CHUNK_SIZE
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_artifacts_pb2 import ArtifactCredentialInfo
  from mlflow.store.artifact.cloud_artifact_repo import CloudArtifactRepository, _complete_futures, _compute_num_chunks
label_desc: Use image node_id 8 for calling the AzureDataLakeArtifactRepository obj's underlying member method code with example usage: obj._multipart_upload(credentials, src_file_path, artifact_file_path) without return types