code: def test_multipart_upload_abort(
      databricks_artifact_repo, large_file, mock_chunk_size
  ):
      mock_credential_info = ArtifactCredentialInfo(
          signed_uri=MOCK_AWS_SIGNED_URI,
          type=ArtifactCredentialType.AWS_PRESIGNED_URL,
      )
      mock_upload_id = "upload_id"
      create_mpu_response = CreateMultipartUpload.Response(
          upload_id=mock_upload_id,
          upload_credential_infos=[
              ArtifactCredentialInfo(
                  signed_uri=f"{MOCK_AWS_SIGNED_URI}partNumber={i + 1}",
                  type=ArtifactCredentialType.AWS_PRESIGNED_URL,
                  headers=[
                      ArtifactCredentialInfo.HttpHeader(
                          name="header", value=f"part-{i + 1}"
                      )
                  ],
              )
              for i in range(2)
          ],
          abort_credential_info=ArtifactCredentialInfo(
              signed_uri=f"{MOCK_AWS_SIGNED_URI}uploadId=abort",
              type=ArtifactCredentialType.AWS_PRESIGNED_URL,
              headers=[
                  ArtifactCredentialInfo.HttpHeader(
                      name="header", value="abort"
                  )
              ],
          ),
      )
      with mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY}._get_write_credential_infos",
          return_value=[mock_credential_info],
      ), mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY}._call_endpoint",
          side_effect=[
              create_mpu_response,
              Exception("Failed to complete multipart upload"),
          ],
      ) as call_endpoint_mock, mock.patch(
          "requests.Session.request", side_effect=mock_request
      ) as http_request_mock:
          with pytest.raises(
              Exception, match="Failed to complete multipart upload"
          ):
              databricks_artifact_repo.log_artifact(large_file)
  
          (
              *part_upload_calls,
              abort_call,
          ) = http_request_mock.call_args_list
          with large_file.open("rb") as f:
              expected_calls = [
                  mock.call(
                      "put",
                      f"{MOCK_AWS_SIGNED_URI}partNumber={i + 1}",
                      allow_redirects=True,
                      data=f.read(mock_chunk_size),
                      headers={"header": f"part-{i + 1}"},
                      timeout=None,
                  )
                  for i in range(2)
              ]
          # The upload-part requests are sent in parallel, so the order of the calls is not
          # deterministic
          assert (
              sorted(part_upload_calls, key=lambda c: c.args[1])
              == expected_calls
          )
          complete_request_body = json.loads(
              call_endpoint_mock.call_args_list[-1].args[-1]
          )
          assert complete_request_body["upload_id"] == mock_upload_id
          assert complete_request_body["part_etags"] == [
              {"part_number": 1, "etag": "etag-1"},
              {"part_number": 2, "etag": "etag-2"},
          ]
          assert abort_call == mock.call(
              "delete",
              f"{MOCK_AWS_SIGNED_URI}uploadId=abort",
              allow_redirects=True,
              headers={"header": "abort"},
              timeout=None,
          )
  
imports: import json
  import os
  import posixpath
  import re
  import shutil
  import time
  from unittest import mock
  from unittest.mock import ANY
  import pytest
  from requests.models import Response
  from mlflow.entities.file_info import FileInfo
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_artifacts_pb2 import ArtifactCredentialInfo, ArtifactCredentialType, CompleteMultipartUpload, CreateMultipartUpload, GetCredentialsForRead, GetCredentialsForWrite, GetPresignedUploadPartUrl
  from mlflow.protos.service_pb2 import FileInfo, ListArtifacts
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.databricks_artifact_repo import _MAX_CREDENTIALS_REQUEST_SIZE, DatabricksArtifactRepository
label_desc: Use image node_id 44 for calling a global function with example usage: test_multipart_upload_abort(databricks_artifact_repo, large_file, mock_chunk_size) without return types