code: def test_complete_multipart_upload(s3_artifact_root):
      repo = get_artifact_repository(
          posixpath.join(s3_artifact_root, "some/path")
      )
      local_file = "local_file"
      create = repo.create_multipart_upload(local_file, 2)
  
      # cannot complete invalid upload
      fake_parts = [
          MultipartUploadPart(part_number=1, etag="fake_etag1"),
          MultipartUploadPart(part_number=2, etag="fake_etag2"),
      ]
      with pytest.raises(
          botocore.exceptions.ClientError, match=r"InvalidPart"
      ):
          repo.complete_multipart_upload(
              local_file, create.upload_id, fake_parts
          )
  
      # can complete valid upload
      parts = []
      data = b"0" * 5 * 1024 * 1024
      for credential in create.credentials:
          url = credential.url
          response = requests.put(url, data=data)
          parts.append(
              MultipartUploadPart(
                  part_number=credential.part_number,
                  etag=response.headers["ETag"],
              )
          )
  
      repo.complete_multipart_upload(
          local_file, create.upload_id, parts
      )
  
      # verify upload is completed
      bucket, _ = repo.parse_s3_compliant_uri(s3_artifact_root)
      s3_client = repo._get_s3_client()
      response = s3_client.list_multipart_uploads(Bucket=bucket)
      assert response.get("Uploads") is None
  
imports: import json
  import os
  import posixpath
  import tarfile
  from datetime import datetime
  from unittest import mock
  from unittest.mock import ANY
  import botocore.exceptions
  import pytest
  import requests
  from mlflow.entities.multipart_upload import MultipartUploadPart
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.optimized_s3_artifact_repo import OptimizedS3ArtifactRepository
  from mlflow.store.artifact.s3_artifact_repo import _MAX_CACHE_SECONDS, S3ArtifactRepository, _cached_get_s3_client
  from tests.helper_functions import set_boto_credentials
label_desc: Use image node_id 21 for calling a global function with example usage: test_complete_multipart_upload(s3_artifact_root) without return types